Download Dockerfile from sairamv1/FastAPI: direct link, hf CLI and curl.
- Browser
- Download file 645 Bytes
-
https://huggingface.co/spaces/sairamv1/FastAPI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/sairamv1/FastAPI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/sairamv1/FastAPI/resolve/main/Dockerfile
645 Bytes
| FROM python:3.10-slim | |
| WORKDIR /code | |
| # Install system dependencies for OpenCV (including libGL) | |
| RUN apt-get update && apt-get install -y \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender-dev \ | |
| libgomp1 \ | |
| libxcb1 \ | |
| libxcb-shm0 \ | |
| libxcb-render0 \ | |
| libgl1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r /code/requirements.txt | |
| COPY app.py /code/app.py | |
| RUN mkdir -p /tmp/huggingface && chmod 777 /tmp/huggingface | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |