Spaces:
Runtime error
Runtime error
# Use a base image with Python 3.9 | |
FROM python:3.9 | |
# Set the working directory in the container | |
WORKDIR /code | |
# Create a writable directory for the Transformers cache | |
RUN mkdir -p /transformers_cache | |
# Set the TRANSFORMERS_CACHE environment variable to the writable directory | |
ENV TRANSFORMERS_CACHE=/transformers_cache | |
# Copy the requirements file to the container | |
COPY ./requirements.txt /code/requirements.txt | |
# Install the Python dependencies | |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
# Copy the entire content of the current directory into the container | |
COPY . . | |
# Specify the command to run when the container starts | |
CMD ["python", "app.py"] | |