Download Dockerfile from SandiyoS/BitV2: direct link, hf CLI and curl.
- Browser
- Download file 796 Bytes
-
https://huggingface.co/spaces/SandiyoS/BitV2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/SandiyoS/BitV2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/SandiyoS/BitV2/resolve/main/Dockerfile
796 Bytes
| FROM python:3.10-slim | |
| RUN apt-get update && apt-get install -y \ | |
| git libgl1 libglib2.0-0 libsm6 libxext6 libxrender-dev libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH | |
| COPY --chown=user requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir --user -r requirements.txt | |
| # Pre-download models | |
| RUN python -c "from ultralytics import YOLO; YOLO('yolov8n.pt')" | |
| RUN python -c "import open_clip; open_clip.create_model_and_transforms('ViT-L-16-SigLIP-256', pretrained='webli')" | |
| COPY --chown=user app_gradio.py /app/app.py | |
| COPY --chown=user icon_model_hybrid /app/icon_model_hybrid | |
| EXPOSE 7860 | |
| CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |