team3 / Dockerfile
BjarneBepaData
A new cache directory
cf78cd2
#
FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04
USER root
# Install python and pip
RUN apt-get update && apt-get install -y python3 python3-pip \
&& apt-get install -y git
# The commands as another prerequisite
RUN pip install --upgrade pip
RUN pip install --upgrade git+https://github.com/huggingface/transformers.git accelerate datasets[audio]
#
WORKDIR /code
RUN mkdir -p /app/.cache
RUN chmod -R 777 /app/.cache
ENV HUGGINGFACE_CACHE_DIR=/app/.cache
#
COPY ./requirements.txt /code/requirements.txt
#
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
#
COPY ./app /code/app
#
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]