From 4ab7f75d7d5fc19d1dd63e19a5f3000761c6dcbc Mon Sep 17 00:00:00 2001 From: alec-flowers Date: Tue, 27 May 2025 20:36:26 -0700 Subject: [PATCH] fix paths and bashrc problem --- .devcontainer/post-create.sh | 16 ++++++++++++---- container/Dockerfile.vllm | 4 ++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index e6629a2e10..21e10c6874 100755 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -64,7 +64,15 @@ cd $HOME/dynamo && retry env DYNAMO_BIN_PATH=$HOME/dynamo/.build/target/debug uv export PYTHONPATH=/home/ubuntu/dynamo/components/planner/src:$PYTHONPATH -# source the venv and set the VLLM_KV_CAPI_PATH in bashrc -echo "source /opt/dynamo/venv/bin/activate" >> ~/.bashrc -echo "export VLLM_KV_CAPI_PATH=$HOME/dynamo/.build/target/debug/libdynamo_llm_capi.so" >> ~/.bashrc -echo "export GPG_TTY=$(tty)" >> ~/.bashrc +# Add to bashrc only if not already present +if ! grep -q "source /opt/dynamo/venv/bin/activate" ~/.bashrc; then + echo "source /opt/dynamo/venv/bin/activate" >> ~/.bashrc +fi + +if ! grep -q "export VLLM_KV_CAPI_PATH=" ~/.bashrc; then + echo "export VLLM_KV_CAPI_PATH=$HOME/dynamo/.build/target/debug/libdynamo_llm_capi.so" >> ~/.bashrc +fi + +if ! grep -q "export GPG_TTY=" ~/.bashrc; then + echo "export GPG_TTY=$(tty)" >> ~/.bashrc +fi diff --git a/container/Dockerfile.vllm b/container/Dockerfile.vllm index d67859a700..848ca59f6d 100644 --- a/container/Dockerfile.vllm +++ b/container/Dockerfile.vllm @@ -297,8 +297,12 @@ COPY --from=base --chown=$USERNAME:$USERNAME /usr/local/bin /usr/local/bin USER $USERNAME ENV HOME=/home/$USERNAME ENV PYTHONPATH=$HOME/dynamo/deploy/sdk/src:$PYTHONPATH:$HOME/dynamo/components/planner/src:$PYTHONPATH +ENV CARGO_TARGET_DIR=$HOME/dynamo/.build/target WORKDIR $HOME +# so we can use maturin develop +RUN uv pip install maturin + # https://code.visualstudio.com/remote/advancedcontainers/persist-bash-history RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=$HOME/.commandhistory/.bash_history" \ && mkdir -p $HOME/.commandhistory \