Skip to content

Commit

Permalink
use python3.10 shipped with ubuntu22.04 (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
arogozhnikov authored Nov 22, 2024
1 parent c32518e commit 0972574
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Dockerfile.chailab
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ RUN --mount=type=cache,target=/var/cache/apt \
# text editors, needed by git cli
nano vim \
build-essential libstdc++6 \
# python
python3.10 python3.10-dev \
# (run continues)
# stop git from complaining about dubious ownership.
&& git config --global --add safe.directory "*" \
Expand All @@ -49,7 +51,7 @@ RUN --mount=type=cache,target=/var/cache/apt \

ENV \
# expose CUDA libraries. Now that we don't build anything this is likely redundant
LD_LIBRARY_PATH="/usr/local/cuda/lib64/stubs/:$LD_LIBRARY_PATH" \
LD_LIBRARY_PATH="/usr/local/cuda/lib64/stubs/:${LD_LIBRARY_PATH:-}" \
# Set uv timeout to larger value to account for slow download time of nvidia-cudnn-cu12
UV_HTTP_TIMEOUT=1000 \
# where virtual env will be installed
Expand All @@ -60,13 +62,15 @@ COPY ./requirements.in /tmp/requirements.in
# from https://pythonspeed.com/articles/activate-virtualenv-dockerfile/
# a trick to have virtualenv "always activated"
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN --mount=type=cache,target=/root/.cache/uv \
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh \
&& $HOME/.cargo/bin/uv venv --python 3.10 $VIRTUAL_ENV \
curl -LsSf https://astral.sh/uv/0.5.4/install.sh | sh \
&& . $HOME/.local/bin/env \
&& uv venv --no-python-downloads $VIRTUAL_ENV \
# this is sh, not bash, so . not source
&& . $VIRTUAL_ENV/bin/activate \
&& $HOME/.cargo/bin/uv pip install uv pip -r /tmp/requirements.in
&& uv pip install uv pip -r /tmp/requirements.in


# making sure envvars are set in all shells
Expand Down

0 comments on commit 0972574

Please sign in to comment.