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

[devcontainer] add non-root user #2989

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

ByronHsu
Copy link
Collaborator

Motivation

To fix microsoft/vscode-remote-release#49 (comment)

Modifications

Checklist

@ByronHsu ByronHsu changed the title Byhsu/devcontainer nonroot [devcontainer] add non-root user Jan 19, 2025
@@ -225,5 +225,30 @@ setopt HIST_FIND_NO_DUPS
setopt INC_APPEND_HISTORY
EOF

# Set workspace directory
# Create non-root user with specified UID and GID
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker pull lmsysorg/sglang:dev
docker run -itd --shm-size 32g --gpus all -v /opt/dlami/nvme/.cache:/root/.cache --ipc=host --name sglang_zhyncs lmsysorg/sglang:dev /bin/zsh
docker exec -it sglang_zhyncs /bin/zsh

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After that, you can use VSCode to attach to the container.

Copy link
Collaborator Author

@ByronHsu ByronHsu Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! The issue happens with dev container extension. I will use this as a temp solution but we don't have to merge the code. I think your solution should work since we directly develop in a container and do not mount between local and container

Copy link
Member

@zhyncs zhyncs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ByronHsu How about using lmsysorg/sglang:dev as a base and adding a Dockerfile.local for VSCode development? That seems good to me.

@zhyncs zhyncs self-assigned this Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Files created inside container are owned by root:root instead of my user
2 participants