Spaces:
Runtime error
Runtime error
Download Dockerfile from Atomio/hikvision-isup: direct link, hf CLI and curl.
- Browser
- Download file 870 Bytes
-
https://huggingface.co/spaces/Atomio/hikvision-isup/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Atomio/hikvision-isup/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Atomio/hikvision-isup/resolve/main/Dockerfile
870 Bytes
| # Use a slim Python image for a smaller container size | |
| FROM python:3.9-slim | |
| # Set up a non-root user for better security | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| ENV PYTHONUNBUFFERED=1 | |
| # Set the working directory inside the container | |
| WORKDIR /app | |
| # Copy and install the Python dependencies | |
| COPY --chown=user:user ./requirements.txt requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Copy the application source code into the container | |
| COPY --chown=user:user . . | |
| # Expose the ports for documentation and discovery | |
| # The actual mapping happens in the `docker run` command | |
| EXPOSE 7860 | |
| EXPOSE 7660 | |
| # The command that will be executed when the container starts | |
| # This launches the FastAPI application, which in turn starts the ISUP server | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |