Spaces:
Paused
Paused
| # Use the official vLLM image as our base | |
| FROM vllm/vllm-openai:latest | |
| # Set environment variables so vLLM binds to the correct HF port | |
| ENV HOST="0.0.0.0" | |
| ENV PORT="7860" | |
| # HF Spaces runs as a non-root user. We need to tell vLLM to download | |
| # the model into a temporary folder where it has write permissions. | |
| ENV HF_HOME="/tmp/.cache/huggingface" | |
| RUN mkdir -p /tmp/.cache/huggingface && chmod 777 /tmp/.cache/huggingface | |
| # Start the OpenAI-compatible vLLM server | |
| ENTRYPOINT ["python3", "-m", "vllm.entrypoints.openai.api_server"] | |
| # Pass the model configurations | |
| CMD ["--model", "google/gemma-4-E4B-it", "--max-model-len", "4096", "--dtype", "half", "--enforce-eager", "--host", "0.0.0.0", "--port", "7860"] |