Download Dockerfile from Neerajkadari/Context-Aware_Conversational_Intelligence_System: direct link, hf CLI and curl.
- Browser
- Download file 703 Bytes
-
https://huggingface.co/spaces/Neerajkadari/Context-Aware_Conversational_Intelligence_System/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Neerajkadari/Context-Aware_Conversational_Intelligence_System/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Neerajkadari/Context-Aware_Conversational_Intelligence_System/resolve/main/Dockerfile
703 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements first for better caching | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy all application files | |
| COPY . . | |
| # Download models from Hugging Face Hub using inline Python | |
| RUN python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='Neerajkadari/my_project_models', repo_type='model', local_dir='/app/downloaded_models', force_download=False)" | |
| # Expose port | |
| EXPOSE 7860 | |
| # Set environment | |
| ENV HOST=0.0.0.0 | |
| ENV PORT=7860 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Run the app | |
| CMD ["python", "app.py"] |