Skip to content

Commit 63093cc

Browse files
authored
Update Dockerfile
1 parent 178946c commit 63093cc

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,19 @@ RUN \
6060
# Install 'uv' (the fast Python package manager).
6161
curl -LsSf https://astral.sh/uv/install.sh | sh && \
6262
\
63-
# Create the configuration directory for uv and set the index-url via uv.toml.
63+
# Create the configuration directory for uv.
6464
mkdir -p ~/.config/uv && \
65-
echo -e '[tool.uv]\nindex-url = "https://mirrors.aliyun.com/pypi/simple"' > ~/.config/uv/uv.toml && \
65+
\
66+
### --- [ THE FIX IS HERE - Using a more robust method ] --- ###
67+
# Create the uv.toml file using a "here document", which is reliable across all shells.
68+
cat <<EOF > ~/.config/uv/uv.toml && \
69+
[tool.uv]
70+
index-url = "https://mirrors.aliyun.com/pypi/simple"
71+
EOF
6672
\
6773
# Create the default conda environment.
6874
conda create -n py${PYTHON_VERSION} python=${PYTHON_VERSION} -y && \
6975
\
70-
### --- [ MODIFICATION IS HERE ] --- ###
7176
# Pre-install a minimal set of core data science libraries.
7277
uv pip install --python=${CONDA_DIR}/envs/py${PYTHON_VERSION}/bin/python \
7378
numpy \

0 commit comments

Comments
 (0)