Spaces:
Running
Running
File size: 696 Bytes
10b2c2b bb9a613 10b2c2b |
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 33 34 |
# HF Spaces compatible base image
FROM python:3.9-slim
# Prevent Python from writing .pyc files
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set working directory
WORKDIR /app
# System dependencies (safe defaults)
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first (better Docker caching)
COPY requirements.txt .
# Upgrade pip and install dependencies
RUN pip install --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Hugging Face Spaces uses port 7860
EXPOSE 7860
# Start the app
CMD ["python", "app.py"]
|