superset: docker compose -f docker-compose-image-tag.yml up fails with "uv: command not found"

Bug description

I follow the quickstart guide and at the step of docker compose -f docker-compose-image-tag.yml up It downloaded all the images and after the DB and REDIS containers initialized all the other containers were constantly spamming the output with messages like:


superset_app          | Reinstalling the app in editable mode
superset_app          | /app/docker/docker-bootstrap.sh: line 24: uv: command not found
superset_worker_beat  | Reinstalling the app in editable mode
superset_worker_beat  | /app/docker/docker-bootstrap.sh: line 24: uv: command not found

I was able to start Superset with docker compose -f docker-compose-non-dev.yml up

How can I troubleshoot what happened with the suggested docker-compose-image-tag.yml flow?

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

Not applicable

Node version

Not applicable

Browser

Not applicable

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn’t find a solution to my problem.
  • I have searched the GitHub issue tracker and didn’t find a similar bug report.
  • I have checked Superset’s logs for errors and if I found a relevant Python stacktrace, I included it here as text in the “additional context” section.

About this issue

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

Commits related to this issue

Most upvoted comments

I have the same issue on different platforms. It seems that the uv command got added in some files, e.g. docker/docker-boostrap.sh however it is not present in the underlying superset container image.

Temporary workaround is to go back to a version previous to the commits of December, e.g. https://github.com/apache/superset/releases/tag/4.1.1

git fetch --tags if you cloned with depth=1 and git checkout 4.1.1 made my docker compose work again with the docker-compose-image-tag.yml file.

I still think there will be a patched base image soon.

Users are reporting this has broken the quickstart https://superset.apache.org/docs/quickstart/#2-start-the-latest-official-release-of-superset. Requiring users to build an image doesn’t seem appropriate for a quickstart.

I think the ideal fix would be to modify the docker-associated files that reference uv to work with the latest release 4.1.1. That could be reverting or some kind of logic. It won’t be necessary at the next major release but we shouldn’t leave quickstart broken that long.

An immediate fix would be to add a note to the quickstart docs documenting this problem and pointing users to checkout the 4.1.1 tag and run from there as documented above by @maeddes https://github.com/apache/superset/issues/31510#issuecomment-2553351095. I can submit a PR for this.

A quick workaround is to modify the scripts which use uv. Substituting uv pip by just pip removes the errors. I did these modification in docker/docker-bootstrap.sh and docker/pip-install.sh and worked. As mentioned in the previous comments, the apache/superset image must be updated to include uv so it does not throw up this error when building.

Hey @2af! I’m here to help you with any bugs, questions, or contributions. Let’s tackle this together!

The error message you’re encountering, /app/docker/docker-bootstrap.sh: line 24: uv: command not found, indicates that the uv command is missing in the Docker container environment. The uv command is expected to be available as it is used for creating a virtual environment and installing packages in the Superset Docker setup [1].

To troubleshoot this issue, you can try the following steps:

  1. Check Dockerfile: Ensure that the Dockerfile used in the docker-compose-image-tag.yml setup includes the installation of uv. It should have a line similar to RUN pip install --no-cache-dir --upgrade uv.

  2. Rebuild the Image: If the Dockerfile is correct, try rebuilding the Docker image to ensure that all dependencies, including uv, are properly installed. You can do this by running:

    docker compose -f docker-compose-image-tag.yml build --no-cache
    
  3. Verify Installation: After rebuilding, verify that uv is installed by checking the logs during the build process for any errors related to the installation of uv.

  4. Environment Variables: Ensure that the environment variables and paths are correctly set in the Dockerfile or Docker Compose configuration to include the directory where uv is installed.

If these steps do not resolve the issue, you might want to compare the configurations between docker-compose-image-tag.yml and docker-compose-non-dev.yml to identify any differences that could affect the installation or availability of uv.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other