@@ -25,6 +25,8 @@ ENV LD_LIBRARY_PATH "$LD_LIBRARY_PATH:/usr/local/nvidia/lib64"
2525ARG DEBIAN_FRONTEND=noninteractive
2626ARG PYTHON_VERSION=3.9
2727
28+ ARG PYTHON_DEPSET
29+
2830ARG RAY_UID=1000
2931ARG RAY_GID=100
3032
@@ -68,6 +70,7 @@ ENV HOME=/home/ray
6870WORKDIR /home/ray
6971
7072COPY python/requirements_compiled.txt /home/ray/requirements_compiled.txt
73+ COPY "$PYTHON_DEPSET" /home/ray/python_depset.lock
7174
7275SHELL ["/bin/bash" , "-c" ]
7376
@@ -100,27 +103,6 @@ $HOME/anaconda3/bin/conda install -y libgcc-ng python=$PYTHON_VERSION
100103$HOME/anaconda3/bin/conda install -y -c conda-forge libffi=3.4.2
101104$HOME/anaconda3/bin/conda clean -y --all
102105
103- PIP_PKGS=(
104- # Required a recent version of setuptools to be compatible with python 3.12+.
105- setuptools==80.9.0
106-
107- flatbuffers
108- cython
109- numpy # Necessary for Dataset to work properly.
110- psutil
111-
112- # For the ease to submit jobs on various cloud providers.
113- "smart_open[s3,gcs,azure,http]"
114-
115- six
116- boto3
117- pyopenssl
118- cryptography
119- google-api-python-client
120- google-oauth
121- "adlfs[abfs]"
122- )
123-
124106# Install uv
125107wget -qO- https://astral.sh/uv/install.sh | sudo -E env UV_UNMANAGED_INSTALL="/usr/local/bin" sh
126108
@@ -130,9 +112,8 @@ export PATH=$HOME/anaconda3/bin:$PATH
130112# Some packages are on PyPI as well as other indices, but the latter
131113# (unhelpfully) take precedence. We use `--index-strategy unsafe-best-match`
132114# to ensure that the best match is chosen from the available indices.
133- uv pip install --system --no-cache-dir --index-strategy unsafe-best-match \
134- -c $HOME/requirements_compiled.txt \
135- "${PIP_PKGS[@]}"
115+ uv pip install --system --no-cache-dir --no-deps --index-strategy unsafe-best-match \
116+ -r $HOME/python_depset.lock
136117
137118# We install cmake temporarily to get psutil
138119sudo apt-get autoremove -y cmake zlib1g-dev
0 commit comments