Spaces:
Runtime error
Runtime error
Download Dockerfile from SHOU-ISD/object-detection: direct link, hf CLI and curl.
- Browser
- Download file 673 Bytes
-
https://huggingface.co/spaces/SHOU-ISD/object-detection/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/SHOU-ISD/object-detection/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/SHOU-ISD/object-detection/resolve/main/Dockerfile
673 Bytes
| FROM python:3.11-bookworm | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| # Set home to the user's home directory | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| # Set the working directory to the user's home directory | |
| WORKDIR $HOME/app | |
| COPY . $HOME/app | |
| RUN mkdir $HOME/.cache | |
| RUN chown -R user $HOME/.cache | |
| RUN pip install -r requirements.txt | |
| RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \ | |
| HF_TOKEN=$(cat /run/secrets/HF_TOKEN) python yolo_model.py \ | |
| --weight_files=SHOU-ISD/fire-and-smoke:yolov8n.pt \ | |
| --weight_files=SHOU-ISD/yolo-cracks:best.pt \ | |
| --weight_files=ultralyticsplus/yolov8s:yolov8s.pt | |
| ENTRYPOINT ["streamlit", "run", "demo.py"] | |