Skip to content

Commit

Permalink
Swap pyenv with uv in the dev container (#2489)
Browse files Browse the repository at this point in the history
* swap pyenv with uv

* copy install binaries
  • Loading branch information
hellt authored Feb 24, 2025
1 parent e4e77f1 commit b3a6850
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ COPY ./.devcontainer/dclab /usr/local/bin/dclab
# Create SSH key for vscode user to enable passwordless SSH to devices
RUN ssh-keygen -t ecdsa -b 256 -N "" -f ~/.ssh/id_ecdsa

# Install pyenv
RUN bash -c "$(curl https://pyenv.run)"
# Install uv
COPY --from=ghcr.io/astral-sh/uv:0.6.2 /uv /uvx /bin/

# Add empty docker config files to avoid clab warnings for vscode user
RUN mkdir -p /home/vscode/.docker && echo "{}" > /home/vscode/.docker/config.json
Expand All @@ -67,11 +67,3 @@ COPY ./.devcontainer/zsh/.p10k.zsh /home/vscode/.p10k.zsh
COPY ./.devcontainer/zsh/install-zsh-plugins.sh /tmp/install-zsh-plugins.sh
COPY ./.devcontainer/zsh/install-tools-completions.sh /tmp/install-tools-completions.sh
RUN bash -c "/tmp/install-zsh-plugins.sh && /tmp/install-tools-completions.sh"

# Setup pyenv virtual environment for clab tests
COPY tests/requirements.txt /tmp/requirements.txt
ENV PYENV_ROOT="/home/vscode/.pyenv"
ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH"
RUN pyenv virtualenv system clab-rf \
&& pyenv global clab-rf \
&& pip install -r /tmp/requirements.txt

0 comments on commit b3a6850

Please sign in to comment.