Spaces:
Sleeping
Sleeping
Download Dockerfile from Hoanha2101/FPTCheckInFastAPI: direct link, hf CLI and curl.
- Browser
- Download file 505 Bytes
-
https://huggingface.co/spaces/Hoanha2101/FPTCheckInFastAPI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Hoanha2101/FPTCheckInFastAPI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Hoanha2101/FPTCheckInFastAPI/resolve/main/Dockerfile
505 Bytes
| FROM python:3.9 | |
| ENV CUDA_VISIBLE_DEVICES=-1 | |
| # Cài thêm libGL và các phụ thuộc | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Tạo user không root | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --upgrade pip && pip install -r requirements.txt | |
| COPY --chown=user . . | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |