Skip to content

Commit dac3e69

Browse files
committed
Move Rust paths to vscode user home directory
1 parent 97b84d9 commit dac3e69

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ FROM mcr.microsoft.com/devcontainers/python:3.12-bookworm
44
RUN apt-get update && apt-get install -y git-lfs && git lfs install && rm -rf /var/lib/apt/lists/*
55

66
# Required for building Rust-based Python packages (e.g. base2048 via pyrit/azure-ai-evaluation[redteam])
7-
ENV RUSTUP_HOME="/usr/local/rustup" CARGO_HOME="/usr/local/cargo"
8-
ENV PATH="/usr/local/cargo/bin:${PATH}"
9-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
7+
ENV RUSTUP_HOME="/home/vscode/.rustup" CARGO_HOME="/home/vscode/.cargo"
8+
ENV PATH="/home/vscode/.cargo/bin:${PATH}"
9+
RUN mkdir -p /home/vscode/.rustup /home/vscode/.cargo \
10+
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
11+
&& chown -R vscode:vscode /home/vscode/.rustup /home/vscode/.cargo
1012

1113
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
1214

0 commit comments

Comments
 (0)