Spaces:
Sleeping
Sleeping
Download Dockerfile from hossainlab/deepamr-api: direct link, hf CLI and curl.
- Browser
- Download file 658 Bytes
-
https://huggingface.co/spaces/hossainlab/deepamr-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/hossainlab/deepamr-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/hossainlab/deepamr-api/resolve/main/Dockerfile
658 Bytes
| FROM python:3.11-slim | |
| # HF Spaces runs as uid 1000 | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| gcc g++ && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY src/ src/ | |
| COPY models/ models/ | |
| COPY data_processed/ data/processed/ | |
| COPY demo/ demo/ | |
| # Make everything writable for the app user (needed for SQLite DB) | |
| RUN chown -R user:user /app | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "src.api.main:app", "--host", "0.0.0.0", "--port", "7860"] | |