Download Dockerfile from TorchLLM/GeminiRAG: direct link, hf CLI and curl.
- Browser
- Download file 815 Bytes
-
https://huggingface.co/spaces/TorchLLM/GeminiRAG/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/TorchLLM/GeminiRAG/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/TorchLLM/GeminiRAG/resolve/main/Dockerfile
815 Bytes
| # Use Python 3.10 as base image | |
| FROM python:3.10-slim | |
| # Set working directory in container | |
| WORKDIR /app/src | |
| # Copy requirements file | |
| COPY src/requirements.txt . | |
| # Install dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the entire project | |
| COPY src . | |
| # Expose ports for API and Streamlit | |
| EXPOSE 8000 8501 | |
| # Create script to run both services | |
| RUN echo '#!/bin/bash\n\ | |
| python response_api.py &\n\ | |
| sleep 5\n\ | |
| streamlit run app.py' > ./start.sh | |
| # Make the script executable | |
| RUN chmod +x ./start.sh | |
| # Create necessary directories and set permissions | |
| RUN mkdir -p /app/src/.embedchain && chmod -R 777 /app/src/.embedchain | |
| # Copy .env file and set environment variables | |
| COPY src/.env . | |
| # Set environment variables from .env | |
| ENV $(cat .env | xargs) | |
| # Run the start script | |
| CMD ["./start.sh"] | |