Download Dockerfile from LPX55/gemma: direct link, hf CLI and curl.
- Browser
- Download file 659 Bytes
-
https://huggingface.co/spaces/LPX55/gemma/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/LPX55/gemma/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/LPX55/gemma/resolve/main/Dockerfile
659 Bytes
| FROM ollama/ollama:latest | |
| # Use /tmp for Ollama data (writable by all users) | |
| ENV OLLAMA_HOME=/tmp/ollama | |
| RUN mkdir -p /tmp/ollama && chmod 777 /tmp/ollama | |
| # Install netcat-openbsd (more reliable than netcat) | |
| RUN apt-get update && apt-get install -y netcat-openbsd && rm -rf /var/lib/apt/lists/* | |
| # Copy the entrypoint script | |
| COPY entrypoint.sh /usr/local/bin/entrypoint.sh | |
| # Set permissions for the entrypoint script | |
| RUN chmod +x /usr/local/bin/entrypoint.sh | |
| # Set Ollama to listen on all network interfaces | |
| ENV OLLAMA_HOST=0.0.0.0:7860 | |
| # Expose the default port | |
| EXPOSE 7860 | |
| # Use the custom entrypoint script | |
| ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] |