Download Dockerfile from ShadowTEM/Chatbot: direct link, hf CLI and curl.
- Browser
- Download file 1.28 kB
-
https://huggingface.co/spaces/ShadowTEM/Chatbot/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ShadowTEM/Chatbot/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ShadowTEM/Chatbot/resolve/main/Dockerfile
1.28 kB
| FROM python:3.12.8 | |
| # Set environment variables | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV HF_HOME=/app/.huggingface_cache | |
| # Create directories for the Hugging Face cache, VectorDB, models and logs | |
| RUN mkdir -p /app/.huggingface_cache /app/VectorDB /app/models /app/logs | |
| # Install dependencies including wget for downloading model files | |
| RUN apt-get update && apt-get install -y \ | |
| python3-pip \ | |
| python3-dev \ | |
| libatlas-base-dev \ | |
| wget \ | |
| && pip install --no-cache-dir --upgrade pip | |
| # Download the ONNX model file and voices file (adjust URLs if necessary) | |
| RUN wget -O /app/models/kokoro-v1.0.fp16.onnx https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v1.0/kokoro-v1.0.fp16.onnx \ | |
| && wget -O /app/models/voices-v1.0.bin https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files-v1.0/voices-v1.0.bin | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Copy and install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install -r requirements.txt | |
| # Copy the current directory contents into the container | |
| COPY . /app/ | |
| # Set appropriate permissions for the cache, vectorstore, models and logs directories | |
| RUN chmod -R 777 /app | |
| # Expose the port the app runs on | |
| EXPOSE 7860 | |
| # Run the application | |
| CMD ["python", "app.py"] | |