Download Dockerfile from Sanket17/NewParser: direct link, hf CLI and curl.
- Browser
- Download file 958 Bytes
-
https://huggingface.co/spaces/Sanket17/NewParser/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Sanket17/NewParser/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Sanket17/NewParser/resolve/main/Dockerfile
958 Bytes
| FROM registry.hf.space/microsoft-omniparser:latest | |
| USER root | |
| # Set proper permissions for /tmp | |
| RUN chmod 1777 /tmp | |
| # Install CUDA dependencies and system packages | |
| RUN apt update -q && apt install -y --no-install-recommends \ | |
| ca-certificates wget libgl1 \ | |
| && wget -qO /tmp/cuda-keyring.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb \ | |
| && dpkg -i /tmp/cuda-keyring.deb && apt update -q \ | |
| && apt install -y --no-install-recommends libcudnn8 libcublas-12-2 \ | |
| && rm -rf /var/lib/apt/lists/* /tmp/cuda-keyring.deb | |
| # Install Python dependencies | |
| COPY requirements.txt requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application files | |
| COPY main.py main.py | |
| COPY weights.py weights.py | |
| # Expose application port | |
| EXPOSE 7860 | |
| # Run weights.py and start the FastAPI server | |
| CMD ["bash", "-c", "python weights.py && uvicorn main:app --host 0.0.0.0 --port 7860"] | |