File tree Expand file tree Collapse file tree 4 files changed +16
-6
lines changed
Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ RUN apt-get update \
2121 && apt-get -y install --no-install-recommends \
2222 jq \
2323 && rm --recursive --force /var/lib/apt/lists/*
24+ # install uv
25+ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
2426
2527# -------------------------- Build stage -------------------
2628# Installs build/package management tools and third party dependencies
Original file line number Diff line number Diff line change @@ -117,17 +117,16 @@ def setup():
117117 "set -o nounset" ,
118118 "IFS=$(printf '\\ n\\ t')" ,
119119 'echo "Creating virtual environment ..."' ,
120- f'python3 -m venv --system-site-packages --symlinks --upgrade "{ venv_dir } "' ,
121- f'" { venv_dir } /bin/ pip" install -U pip wheel setuptools' ,
122- f'" { venv_dir } /bin/ pip" install -r "{ requirements_txt } "' ,
120+ f'python3 -m virtualenv --system-site-packages --symlinks --without-pip "{ venv_dir } "' ,
121+ 'uv pip install -U pip wheel setuptools' ,
122+ f'uv pip install -r "{ requirements_txt } "' ,
123123 "\n " .join (bash_input_env_export ),
124124 "\n " .join (bash_output_env_export ),
125125 f'echo "Executing code { user_code_entrypoint .name } ..."' ,
126126 f'"{ venv_dir } /bin/python3" "{ user_code_entrypoint } "' ,
127127 'echo "DONE ..."' ,
128128 ]
129- main_script_path = Path ("main.sh" )
130- main_script_path .write_text ("\n " .join (script ))
129+ Path ("main.sh" ).write_text ("\n " .join (script ))
131130
132131
133132def teardown ():
Original file line number Diff line number Diff line change @@ -28,12 +28,16 @@ decorator==5.2.1
2828 # via ipython
2929defusedxml == 0.7.1
3030 # via nbconvert
31+ distlib == 0.3.9
32+ # via virtualenv
3133docopt == 0.6.2
3234 # via pipreqs
3335executing == 2.2.0
3436 # via stack-data
3537fastjsonschema == 2.21.1
3638 # via nbformat
39+ filelock == 3.18.0
40+ # via virtualenv
3741fonttools == 4.58.0
3842 # via matplotlib
3943idna == 3.10
@@ -115,7 +119,9 @@ pillow==11.2.1
115119pipreqs == 0.5.0
116120 # via -r requirements.in
117121platformdirs == 4.3.8
118- # via jupyter-core
122+ # via
123+ # jupyter-core
124+ # virtualenv
119125prompt-toolkit == 3.0.51
120126 # via ipython
121127ptyprocess == 0.7.0
@@ -180,6 +186,8 @@ tzdata==2025.2
180186 # via pandas
181187urllib3 == 2.4.0
182188 # via requests
189+ virtualenv == 20.31.2
190+ # via -r requirements.in
183191wcwidth == 0.2.13
184192 # via prompt-toolkit
185193webencodings == 0.5.1
Original file line number Diff line number Diff line change 77
88# tools
99pipreqs
10+ virtualenv
You can’t perform that action at this time.
0 commit comments