Download Dockerfile from Smartlyqofficial/testchatbot: direct link, hf CLI and curl.
- Browser
- Download file 1.21 kB
-
https://huggingface.co/spaces/Smartlyqofficial/testchatbot/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Smartlyqofficial/testchatbot/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Smartlyqofficial/testchatbot/resolve/main/Dockerfile
1.21 kB
| # Dockerfile (Final Definitive Version) | |
| # Start with a standard Python 3.10 image | |
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Ensure HOME is set so git --global writes to /root/.gitconfig (HF build step) | |
| ENV HOME=/root | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| supervisor \ | |
| wget \ | |
| build-essential \ | |
| git \ | |
| && apt-get clean && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Upgrade pip and install wheel to speed up package installations | |
| RUN pip install --no-cache-dir --upgrade pip wheel setuptools | |
| # Copy and install all Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of your application code | |
| COPY . . | |
| # Ensure Chroma data directory exists and is writable | |
| RUN mkdir -p /data/chroma_db_store && chmod -R 777 /data | |
| # Copy your supervisor configuration | |
| COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
| # Set default port (HF injects PORT env) | |
| ENV PORT=7860 | |
| # Hugging Face Spaces expose port 7860 by default | |
| EXPOSE 7860 | |
| # The final command to run when the container starts | |
| CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] |