Download Dockerfile from amanm10000/MLSC-Coherence-25-FAQ-Chatbot-API: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/spaces/amanm10000/MLSC-Coherence-25-FAQ-Chatbot-API/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/amanm10000/MLSC-Coherence-25-FAQ-Chatbot-API/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/amanm10000/MLSC-Coherence-25-FAQ-Chatbot-API/resolve/main/Dockerfile
1.09 kB
| # Use Python 3.10 as base image | |
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN echo "Installing system dependencies..." && \ | |
| apt-get update && apt-get install -y \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* && \ | |
| echo "System dependencies installed successfully!" | |
| # Create NLTK data directory and set permissions | |
| RUN mkdir -p /nltk_data && \ | |
| chmod 777 /nltk_data | |
| # Copy all application files | |
| COPY . . | |
| RUN echo "Application files copied successfully!" | |
| # Install Python dependencies | |
| RUN echo "Installing Python dependencies..." && \ | |
| pip install --no-cache-dir -r requirements.txt && \ | |
| echo "Python dependencies installed successfully!" | |
| # Download NLTK data | |
| RUN python -c "import nltk; nltk.download('averaged_perceptron_tagger_eng', quiet=True)" | |
| # Expose the port the app runs on | |
| EXPOSE 7860 | |
| # Show directory contents before running the application | |
| RUN echo "Contents of working directory:" && ls -la | |
| # Command to run the application | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |