vllm: [Misc]: missing python inside the container v0.8.1

Anything you want to discuss about vllm.

I pull the apptainer container as following:

apptainer pull docker://vllm/vllm-openai:v0.8.1

the python is not included inside the container:

apptainer shell vllm-openai_v0.8.1.sif
Apptainer> python3
bash: python3: command not found
Apptainer> vllm
bash: /opt/venv/bin/vllm: /opt/venv/bin/python3: bad interpreter: No such file or directory

and the python is actually pointed to an unexisting file:

Apptainer> source /opt/venv/bin/activate
(venv) Apptainer> ls -l /opt/venv/bin/python
lrwxrwxrwx 1 root root 75 Mar 20 04:35 /opt/venv/bin/python -> /root/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/bin/python3.12
(venv) Apptainer> ls /root/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/bin/python3.12
ls: cannot access '/root/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/bin/python3.12': No such file or directory

This issue starts since v0.8.0

Before submitting a new issue…

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 4
  • Comments: 18 (5 by maintainers)

Most upvoted comments

We have this on our radar and are working on a fix.

Having this issue as well with running the images on Openshift (non-root).

you can see the difference below.

Before version 0.8.0, everything worked fine with the following setup, but after version 0.8.0, Python can no longer be found:

v0.8.1

root@41918dcfe23b:/vllm-workspace# which python
/opt/venv/bin/python
root@41918dcfe23b:/vllm-workspace# useradd -ms /bin/bash appuser
root@41918dcfe23b:/vllm-workspace# chown -R appuser:appuser /home/appuser
root@41918dcfe23b:/vllm-workspace# chmod -R 777 /home/appuser
root@41918dcfe23b:/vllm-workspace# su appuser
appuser@41918dcfe23b:/vllm-workspace$ python3
bash: python3: command not found

v.0.7.0

root@568d9d7739e9:/vllm-workspace# which python3
/usr/bin/python3
root@568d9d7739e9:/vllm-workspace# useradd -ms /bin/bash appuser
root@568d9d7739e9:/vllm-workspace# chown -R appuser:appuser /home/appuser
root@568d9d7739e9:/vllm-workspace# chmod -R 777 /home/appuser
root@568d9d7739e9:/vllm-workspace# su appuser
appuser@568d9d7739e9:/vllm-workspace$ python3
Python 3.12.8 (main, Dec  4 2024, 08:54:12) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

We are unable to run the application as a non-root user because Python seems to be installed under the root user. This issue did not occur in previous versions, so it seems that the Docker image was not built in the same way.

Using a Dockerfile like the one below, Python3 cannot be found:

FROM vllm/vllm-openai:v0.8.1

USER root

RUN useradd -ms /bin/bash appuser && \
    chown -R appuser:appuser /home/appuser && \
    chmod -R 777 /home/appuser

COPY startup.sh /home/appuser/

USER appuser

ENTRYPOINT ["/home/appuser/startup.sh"]