Skip to content

Commit 07e4720

Browse files
authored
fix: devcontainer small qol fixes (#1228)
1 parent 811b10a commit 07e4720

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.devcontainer/post-create.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,15 @@ cd $HOME/dynamo && retry env DYNAMO_BIN_PATH=$HOME/dynamo/.build/target/debug uv
6464

6565
export PYTHONPATH=/home/ubuntu/dynamo/components/planner/src:$PYTHONPATH
6666

67-
# source the venv and set the VLLM_KV_CAPI_PATH in bashrc
68-
echo "source /opt/dynamo/venv/bin/activate" >> ~/.bashrc
69-
echo "export VLLM_KV_CAPI_PATH=$HOME/dynamo/.build/target/debug/libdynamo_llm_capi.so" >> ~/.bashrc
70-
echo "export GPG_TTY=$(tty)" >> ~/.bashrc
67+
# Add to bashrc only if not already present
68+
if ! grep -q "source /opt/dynamo/venv/bin/activate" ~/.bashrc; then
69+
echo "source /opt/dynamo/venv/bin/activate" >> ~/.bashrc
70+
fi
71+
72+
if ! grep -q "export VLLM_KV_CAPI_PATH=" ~/.bashrc; then
73+
echo "export VLLM_KV_CAPI_PATH=$HOME/dynamo/.build/target/debug/libdynamo_llm_capi.so" >> ~/.bashrc
74+
fi
75+
76+
if ! grep -q "export GPG_TTY=" ~/.bashrc; then
77+
echo "export GPG_TTY=$(tty)" >> ~/.bashrc
78+
fi

container/Dockerfile.vllm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,12 @@ COPY --from=base --chown=$USERNAME:$USERNAME /usr/local/bin /usr/local/bin
297297
USER $USERNAME
298298
ENV HOME=/home/$USERNAME
299299
ENV PYTHONPATH=$HOME/dynamo/deploy/sdk/src:$PYTHONPATH:$HOME/dynamo/components/planner/src:$PYTHONPATH
300+
ENV CARGO_TARGET_DIR=$HOME/dynamo/.build/target
300301
WORKDIR $HOME
301302

303+
# so we can use maturin develop
304+
RUN uv pip install maturin
305+
302306
# https://code.visualstudio.com/remote/advancedcontainers/persist-bash-history
303307
RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=$HOME/.commandhistory/.bash_history" \
304308
&& mkdir -p $HOME/.commandhistory \

0 commit comments

Comments
 (0)