Skip to content

openshift-compatibility#38552

Open
SorenDreano wants to merge 1 commit into
vllm-project:mainfrom
SorenDreano:dockerfile_openshift
Open

openshift-compatibility#38552
SorenDreano wants to merge 1 commit into
vllm-project:mainfrom
SorenDreano:dockerfile_openshift

Conversation

@SorenDreano
Copy link
Copy Markdown
Contributor

@SorenDreano SorenDreano commented Mar 30, 2026

Purpose

Add a new Dockerfile stage vllm-openai-openshift that produces an OpenShift-compatible variant of the vllm-openai image.

OpenShift runs containers with an arbitrary non-root UID in group 0. The default image fails because vLLM, HuggingFace, Triton, and other libraries attempt to write to cache/config directories under $HOME that don't exist or aren't writable for arbitrary UIDs.

This new image/stage:

  • Redirects all runtime cache/config paths to /cache/* via environment variables (HF_HOME, VLLM_CACHE_ROOT, TRITON_CACHE_DIR, TORCHINDUCTOR_CACHE_DIR, NUMBA_CACHE_DIR, OUTLINES_CACHE_DIR, VLLM_CONFIG_ROOT, XDG_CACHE_HOME, XDG_CONFIG_HOME)
  • Makes /cache and $HOME group-0-writable (chgrp -R 0 + chmod -R g+rwX)
  • Sets USER 1001 so the image never accidentally runs as root outside OpenShift
  • Users can mount a volume at /cache/huggingface to persist downloaded models

Test Plan

  • Build the new target: docker build --target vllm-openai-openshift -t vllm-openai-openshift .
  • Run with an arbitrary UID (simulating OpenShift): docker run --user 12345:0 vllm-openai-openshift Qwen/Qwen3-VL-2B-Instruct
  • Verify all cache directories are writable and the server starts without permission errors

Test Result

Manually verified that the image builds and starts without permission errors when run as an arbitrary non-root UID in group 0.


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added the ci/build label Mar 30, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new Docker build stage, vllm-openai-openshift, designed to support OpenShift environments. The changes include setting environment variables for various cache directories to point to /cache and /tmp, creating these directories, and adjusting group permissions to allow group 0 access, which is necessary for OpenShift's arbitrary UID policy. I have no feedback to provide as the review comment was informational and validated the existing implementation's trade-offs.

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 25, 2026

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @SorenDreano.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant