Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use python3.10 shipped with ubuntu22.04 #169

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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