Team Ai
Apppublic

IDKHowToCodeFr/tinyml-backend

sourceHugging Faceupdated 6h agoView on Hugging Face
1likes
Dockerfile25 linesDownload Raw Back to root
1FROM python:3.12-slim2 3WORKDIR /app4 5# Install system dependencies if required by any ML libraries6RUN apt-get update && apt-get install -y --no-install-recommends \7    build-essential \8    && rm -rf /var/lib/apt/lists/*9 10# Install python dependencies from the backend11COPY backend/requirements.txt .12RUN pip install --no-cache-dir -r requirements.txt13 14# Copy all necessary files and directories15COPY . .16 17# Hugging Face Spaces mandates port 786018EXPOSE 786019 20# Ensure Python knows where to find the backend module21ENV PYTHONPATH=/app22 23# Start the FastAPI server24CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]25