Spaces:
Sleeping
Sleeping
Download Dockerfile from Notionhive/chatbot: direct link, hf CLI and curl.
- Browser
- Download file 645 Bytes
-
https://huggingface.co/spaces/Notionhive/chatbot/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Notionhive/chatbot/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Notionhive/chatbot/resolve/main/Dockerfile
645 Bytes
| # Use an official lightweight Python image | |
| FROM python:3.10-slim | |
| # Set environment variables to prevent Python from writing .pyc files and buffering stdout/stderr | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| RUN mkdir -p /app/hf_cache | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy and install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the entire application | |
| COPY . . | |
| RUN chmod 777 /app/faqs.csv | |
| # Expose the port FastAPI will run on (Hugging Face requires 7860) | |
| EXPOSE 7860 | |
| # Run the FastAPI app using uvicorn | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |