Spaces:
Sleeping
Sleeping
File size: 467 Bytes
a05f004 73dd44f a05f004 73dd44f a05f004 73dd44f b6d0519 73dd44f a05f004 b6d0519 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
FROM python:3.9
# Set the TRANSFORMERS_CACHE environment variable
ENV TRANSFORMERS_CACHE=/app/cache/huggingface/hub
# Copy your app code
COPY . /app
WORKDIR /app
# Install dependencies
RUN pip install -r requirements.txt
# Create the cache directory and set permissions
RUN mkdir -p /app/cache/huggingface/hub && \
chmod -R 777 /app/cache
# Create a non-root user and switch to it
RUN useradd -m appuser
USER appuser
# Start the app
CMD ["python", "app.py"] |