Spaces:
Sleeping
Sleeping
File size: 702 Bytes
e1cef6b 25e8e76 e1cef6b 25e8e76 e1cef6b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
FROM python:3.9-slim
WORKDIR /code
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Create uploads directory and set permissions
RUN mkdir -p /code/static/uploads && \
chmod 777 /code/static/uploads
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Ensure uploads directory has correct permissions
RUN chmod 777 /code/static/uploads
# Make port 7860 available to the world outside this container
EXPOSE 7860
# Run the application
CMD ["python", "app.py"] |