Shujah239's picture
Update Dockerfile
f7f4d0f verified
raw
history blame
479 Bytes
FROM python:3.9-slim
WORKDIR /code
# Create cache directory with proper permissions
RUN mkdir -p /cache
ENV TRANSFORMERS_CACHE=/cache
ENV HF_HOME=/cache
RUN chmod 777 /cache
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY . /code
# Make directory for uploads
RUN mkdir -p /code/uploads
RUN chmod 777 /code/uploads
# Expose the port
EXPOSE 7860
# Command to run the application
CMD ["python", "app.py"]