Spaces:
Sleeping
Sleeping
Download Dockerfile from BiasLab2025/perception2: direct link, hf CLI and curl.
- Browser
- Download file 818 Bytes
-
https://huggingface.co/spaces/BiasLab2025/perception2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/BiasLab2025/perception2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/BiasLab2025/perception2/resolve/main/Dockerfile
818 Bytes
| FROM python:3.10.7-slim | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 | |
| # Create a non-root user with UID 1000 | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| COPY --chown=user requirements.txt ./ | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git \ | |
| wget \ | |
| ca-certificates \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| ffmpeg \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && pip install --no-cache-dir --upgrade pip \ | |
| && pip install --no-cache-dir -r requirements.txt \ | |
| && python -c "import transformers; print('transformers', transformers.__version__); print('has Sam3Model', hasattr(transformers, 'Sam3Model'))" | |
| COPY --chown=user . . | |
| USER user | |
| ENV HOME=/home/user | |
| ENV PATH=/home/user/.local/bin:$PATH | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |