Download backend/Dockerfile from Punit1/Enterprise-AI-Copilot: direct link, hf CLI and curl.
- Browser
- Download file 976 Bytes
-
https://huggingface.co/spaces/Punit1/Enterprise-AI-Copilot/resolve/main/backend/Dockerfile
- Command line
-
hf download hf://spaces/Punit1/Enterprise-AI-Copilot/backend/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Punit1/Enterprise-AI-Copilot/resolve/main/backend/Dockerfile
976 Bytes
| FROM python:3.10-slim | |
| # System dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| gcc \ | |
| g++ \ | |
| libpq-dev \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set workdir | |
| WORKDIR /app | |
| # Install Python deps first (layer caching) | |
| RUN pip install --no-cache-dir --upgrade pip | |
| COPY backend/requirements.txt . | |
| # Install CPU-only PyTorch FIRST to prevent sentence-transformers from pulling GPU/CUDA packages | |
| RUN pip install --no-cache-dir torch==2.2.2+cpu --index-url https://download.pytorch.org/whl/cpu | |
| RUN pip install --no-cache-dir -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu | |
| # Copy source code | |
| COPY backend/ . | |
| COPY agents/ /agents/ | |
| COPY services/ /services/ | |
| # Create uploads directory | |
| RUN mkdir -p /uploads | |
| # Set PYTHONPATH so imports work | |
| ENV PYTHONPATH="/app:/agents:/services" | |
| # Expose port | |
| EXPOSE 8000 | |
| # Default command (overridden by docker-compose) | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] | |