Spaces:
Sleeping
Sleeping
File size: 659 Bytes
5230d2c 794962e 5230d2c 794962e 5230d2c 794962e 5230d2c 794962e 5230d2c 794962e | 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 30 31 32 | FROM python:3.11-slim
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# Install Python dependencies
COPY requirements.txt .
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& pip install --no-cache-dir -r requirements.txt \
&& apt-get purge -y gcc \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
# Copy backend code
COPY main.py .
COPY core ./core
COPY util ./util
# Copy prebuilt static assets
COPY static ./static
# Create data directory (local + HF Spaces Pro)
RUN mkdir -p ./data
# Declare data volume
VOLUME ["/app/data"]
# Start service
CMD ["python", "-u", "main.py"]
|