Nicegi recently released v3.4, and after that, my application running in Docker failed to start.

The previous Dockerfile

Previously, the Docker image looked something like the following:

1
2
3
4
5
6
FROM zauberzeug/nicegui:3.3.0

COPY requirements.txt /requirements.txt
RUN pip install -r /requirements.txt

COPY . /app/

This was sufficient, and everything was fine.

The problem

With version 3.4, Nicegui switched from pip as Package manager to uv.

This has a relevant implication: The native Python interpreter is no used any more. Instead, uv uses a virtual environment, which is now installed in /app/.venv.

My solution

The solution was surprisingly simple, as soon as I had understood the problem: Instead of running RUN pip install -r /requirements.txt, I added uv here: RUN uv pip install -r /requirements.txt. And voila, everything works again!