File size: 545 Bytes
c9f1afa 7b12946 c9f1afa 58a32f7 c9f1afa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# Use the official Python image
FROM python:3.12-slim
# Set the working directory
WORKDIR /app
# Copy the requirements file and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
# Create the data directory and change its ownership
# Hugging Face Spaces run as the 'user' (uid 1000)
RUN mkdir -p /app/data && chown -R 1000:1000 /app/data
WORKDIR /app
# Expose the port the app runs on
EXPOSE 7860
# Run the application
CMD ["python", "main.py"] |