Upload Dockerfile with huggingface_hub
Browse files123456789101112131415161718192021222324252627282930313233343536# Use an official lightweight Python image.FROM python:3.10-slim
# Set environment variablesENV PYTHONDONTWRITEBYTECODE=1ENV PYTHONUNBUFFERED=1ENV HOME=/home/userENV PATH=/home/user/.local/bin:$PATH
# Create a non-root user for security (Hugging Face requirement)RUN useradd -m -u 1000 userUSER userWORKDIR $HOME/app
# Install system dependencies as rootUSER rootRUN apt-get update && apt-get install -y --no-install-recommends \ libgl1 \ libglib2.0-0 \ ffmpeg \ && rm -rf /var/lib/apt/lists/*USER user
# Copy requirements and install dependenciesCOPY --chown=user requirements.txt .RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application codeCOPY --chown=user . .
# Hugging Face Spaces expects the app to run on port 7860EXPOSE 7860
# Run the applicationCMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]DockerfileAdded+36