Skip to content

Commit 9c8127c

Browse files
committed
[ci] install uv python in forge without project
so that it does not need / create project config files we just need the self-contained binary Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
1 parent a0675a5 commit 9c8127c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

ci/docker/forge.Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,16 @@ wget -qO- https://astral.sh/uv/install.sh | sudo env UV_UNMANAGED_INSTALL="/usr/
6161

6262
mkdir -p /usr/local/python
6363
# Install Python 3.9 using uv
64-
uv python install --install-dir /usr/local/python 3.9
65-
uv python pin 3.9
64+
UV_PYTHON_VERSION=3.9
65+
uv python install --install-dir /usr/local/python "$UV_PYTHON_VERSION"
6666

6767
export UV_PYTHON_INSTALL_DIR=/usr/local/python
68-
# Make Python 3.9 from uv the default by creating symlinks
69-
PYTHON39_PATH=$(uv python find 3.9)
70-
echo $PYTHON39_PATH
71-
ln -s $PYTHON39_PATH /usr/local/bin/python3.9
72-
ln -s $PYTHON39_PATH /usr/local/bin/python3
73-
ln -s $PYTHON39_PATH /usr/local/bin/python
68+
# Make Python from uv the default by creating symlinks
69+
UV_PYTHON_BIN=$(uv python find --no-project "$UV_PYTHON_VERSION")
70+
echo "uv python binary location: $UV_PYTHON_BIN"
71+
ln -s "$UV_PYTHON_BIN" "/usr/local/bin/python${UV_PYTHON_VERSION}"
72+
ln -s "$UV_PYTHON_BIN" /usr/local/bin/python3
73+
ln -s "$UV_PYTHON_BIN" /usr/local/bin/python
7474

7575
# As a convention, we pin all python packages to a specific version. This
7676
# is to to make sure we can control version upgrades through code changes.

0 commit comments

Comments
 (0)