File size: 719 Bytes
a1656e2 84de8c5 f3bf7b5 84de8c5 f3bf7b5 84de8c5 a1656e2 84de8c5 a1656e2 84de8c5 a1656e2 f162ecf 66625c1 a1656e2 fdcf510 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# Use an official Python runtime as a parent image
FROM python:3.9
# Set the working directory in the container
WORKDIR /code
# Copy the dependencies file to the working directory
COPY ./requirements.txt /code/requirements.txt
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy the rest of your application's code to the working directory
COPY . /code
# Create a directory for the Hugging Face cache and set correct permissions
RUN mkdir -p /code/huggingface_cache && chmod -R 777 /code/huggingface_cache
ENV HF_HOME=/code/huggingface_cache
# Run the application
CMD ["sh", "-c", "gunicorn -b 0.0.0.0:7860 --timeout 300 app:app"]
|