sohamnk's picture
Update Dockerfile
8b6199a verified
raw
history blame
543 Bytes
FROM python:3.10-slim
# working directory
WORKDIR /code
ENV HF_HOME=/tmp/huggingface_cache
ENV TORCH_HOME=/tmp/torch_cache
RUN mkdir -p $HF_HOME && chmod -R 777 $HF_HOME
RUN mkdir -p $TORCH_HOME && chmod -R 777 $TORCH_HOME
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY . /code/
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "300", "app:app"]