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

fix: merge install & rm MANAGED file in same layer #27

Merged
merged 1 commit into from
Nov 20, 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
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ RUN pnpm config set store-dir ${PNPM_HOME}/store && \
# setup uv and python
ENV PYTHON_VERSION="3.10.12"
ENV PATH="${HOME}/.local/uv_bin/:${PATH}"
RUN curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR=${HOME}/.local/uv_bin bash && \
uv python install ${PYTHON_VERSION}

# We need to make python effective globally, but uv currently does not have a command to directly obtain the full path of the current python, so it can be done by manual concatenation.
# Also, there is no elegant way to get the current architecture, so we can only solve it by adding all the paths for x64 and arm64 to PATH.
ENV PATH="${HOME}/.local/share/uv/python/cpython-${PYTHON_VERSION}-linux-x86_64-gnu/bin:${HOME}/.local/share/uv/python/cpython-${PYTHON_VERSION}-linux-aarch64-gnu/bin:${PATH}"
# Remove EXTERNALLY-MANAGED to allow pip to install packages globally
RUN rm "$(python3 -c "import site, sysconfig; print(sysconfig.get_path('stdlib'));")/EXTERNALLY-MANAGED"

RUN curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR=${HOME}/.local/uv_bin bash && \
uv python install ${PYTHON_VERSION} && \
rm "$(python3 -c "import site, sysconfig; print(sysconfig.get_path('stdlib'));")/EXTERNALLY-MANAGED"


# WSL2 GPU Driver libraries load path
RUN mkdir -p "/etc/ld.so.conf.d" && \
Expand Down
Loading