Spaces:
Sleeping
Sleeping
Download Dockerfile from VisionShield/VISIONSHIELD: direct link, hf CLI and curl.
- Browser
- Download file 820 Bytes
-
https://huggingface.co/spaces/VisionShield/VISIONSHIELD/resolve/refs%2Fpr%2F1/Dockerfile
- Command line
-
hf download hf://spaces/VisionShield/VISIONSHIELD@refs/pr/1/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/VisionShield/VISIONSHIELD/resolve/refs%2Fpr%2F1/Dockerfile
820 Bytes
| FROM python:3.10-slim | |
| #on choisi une image Docker de base (notre environnement) | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1-mesa-glx \ | |
| libglib2.0-0 \ | |
| g++ \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| #on installe les paquets systeme | |
| #libgl1-mesa-glx pour opencv | |
| #g++ pour insightface | |
| #build-essential pour les outils de compilation | |
| WORKDIR /app | |
| #on crée le dossier de travail du docker | |
| COPY requirements.txt . | |
| #on copie notre fichier des dependances pour les installer ensuite | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| #on installe les dépendances | |
| COPY . . | |
| #on copie tout notre repo | |
| EXPOSE 7860 | |
| # on expose le port par défaut de Hugging face pour acceder à mon API | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |
| #on lance notre serveur FastAPI | |