Spaces:
Sleeping
Sleeping
Download Dockerfile from krupal02/AccidentAI: direct link, hf CLI and curl.
- Browser
- Download file 705 Bytes
-
https://huggingface.co/spaces/krupal02/AccidentAI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/krupal02/AccidentAI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/krupal02/AccidentAI/resolve/main/Dockerfile
705 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system dependencies for OpenCV | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender-dev \ | |
| libxcb1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Install CPU-only PyTorch (keeps image small) | |
| RUN pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu | |
| # Install ultralytics (YOLO) | |
| RUN pip install ultralytics | |
| COPY . . | |
| EXPOSE 7860 | |
| # Run Streamlit (default for HF Spaces) | |
| CMD ["streamlit", "run", "streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"] |