Spaces:
Sleeping
Sleeping
Download Dockerfile from Digambar29/emotion-recognition-api: direct link, hf CLI and curl.
- Browser
- Download file 514 Bytes
-
https://huggingface.co/spaces/Digambar29/emotion-recognition-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Digambar29/emotion-recognition-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Digambar29/emotion-recognition-api/resolve/main/Dockerfile
514 Bytes
| # 1. Base image: lightweight Linux + Python | |
| FROM python:3.10-slim | |
| # 2. Set working directory inside container | |
| WORKDIR /app | |
| # 3. Copy dependency list first (Docker caching trick) | |
| COPY requirements.txt . | |
| # 4. Install dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 5. Copy only necessary app files | |
| COPY model/ /app/model/ | |
| COPY api/ /app/api/ | |
| # 6. Expose the port FastAPI will run on | |
| EXPOSE 7860 | |
| # 7. Start the FastAPI app | |
| CMD ["uvicorn", "api.api:app", "--host", "0.0.0.0", "--port", "7860"] | |