Spaces:
Sleeping
Sleeping
Download Dockerfile from AurevinP/Structura-AI: direct link, hf CLI and curl.
- Browser
- Download file 812 Bytes
-
https://huggingface.co/spaces/AurevinP/Structura-AI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/AurevinP/Structura-AI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/AurevinP/Structura-AI/resolve/main/Dockerfile
812 Bytes
| # Use an official Python runtime as a parent image | |
| FROM python:3.10-slim | |
| # Set environment variables | |
| ENV PYTHONUNBUFFERED 1 | |
| # Set the port Uvicorn will listen on | |
| ENV PORT 8000 | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Install system dependencies needed by some Python packages (e.g., OpenCV) | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . /app | |
| RUN python -c "import depth_texture_mask; depth_texture_mask.init_midas()" | |
| # Expose the port | |
| EXPOSE ${PORT} | |
| # Run using uvicorn | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"] |