svm / Dockerfile
ElmahdiJaouali
Fix: Copy static directory to Docker container
56fe063
raw
history blame contribute delete
666 Bytes
FROM python:3.9-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0t64 \
libsm6 \
libxext6 \
libxrender-dev \
libgomp1 \
libxcb1 \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements first for better caching
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY api/ ./api/
COPY dashboard/ ./dashboard/
COPY static/ ./static/
# Expose port for Hugging Face Spaces
EXPOSE 7860
# Run the application
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "7860"]