Skip to content

lambda-science/uv-docker-editable-issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UV Docker Prod/Dev + Local UV Env issue demo

In a figure:

img.png

The goal is to:

  • Be able to install a local workspace with uv sync
  • Be able to build a dev image that install pythia-client package from local folder in editable mode.
  • Be able to build a prod image that install pythia-client package from PyPI.

WHAT TO FIX: find a way to edit packagec/pyproject.toml to install locally the pythia-client in the dev image and from Pypi in the prod image while keeping uv sync working.

Current State of repo:

uv sync works. Build&Run prod/dev images works but the dev image only pull from PyPi and not from local path.

To reproduce

  • Install local uv env for IDE: uv sync => OK
  • Build prod image: docker build --no-cache -t packagec-image-prod -f packagec/Dockerfile.prod .
  • Run prod image: docker run packagec-image-prod => Should error with ModuleNotFoundError: No module named 'pythia_client.hello' if the package is pulled from Pypi it's OK !
  • Build dev image: docker build --no-cache -t packagec-image-dev -f packagec/Dockerfile.dev .
  • Run dev image: docker run -v pythia-client:/pythia-client packagec-image-dev => Should print Hello from pythia-client EDITABLE install !

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages