Spaces:
Sleeping
Sleeping
Download Dockerfile from mathanmithun/dhigrowth_api: direct link, hf CLI and curl.
- Browser
- Download file 794 Bytes
-
https://huggingface.co/spaces/mathanmithun/dhigrowth_api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/mathanmithun/dhigrowth_api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/mathanmithun/dhigrowth_api/resolve/main/Dockerfile
794 Bytes
| FROM ubuntu:22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Install system dependencies | |
| RUN apt update && apt install -y \ | |
| build-essential \ | |
| git \ | |
| cmake \ | |
| python3 \ | |
| python3-pip \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Build llama.cpp | |
| RUN git clone https://github.com/ggerganov/llama.cpp /llama.cpp \ | |
| && cd /llama.cpp \ | |
| && cmake -B build -DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=OFF \ | |
| && cmake --build build | |
| # Set working directory | |
| WORKDIR /app | |
| # Install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip3 install --no-cache-dir -r requirements.txt | |
| # Copy application files | |
| COPY app.py . | |
| COPY model/ ./model/ | |
| # Expose HTTP port (Hugging Face Spaces uses 7860) | |
| EXPOSE 7860 | |
| # Start backend server | |
| CMD ["python3", "app.py"] | |