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

[ci] Add non-root user and conda environment #3226

Merged
merged 3 commits into from
Oct 22, 2021
Merged

Conversation

qiao-bo
Copy link
Collaborator

@qiao-bo qiao-bo commented Oct 19, 2021

Related issue = #3150

Currently support

  • non-root user for container access
  • Multi-python environment via Conda
  • Fetch Taichi from commit

Ubuntu 20.04 support (tested locally)

  • python 3.9
  • python 3.8
  • python 3.7
  • python 3.6

Ubuntu 18.04 support (tested locally)

  • python 3.9
  • python 3.8
  • python 3.7
  • python 3.6

How to get the image:

You can build the image with nvidia-docker build -t name:tag ., or pull from registry.taichigraphics.com/taichidev-ubuntu20.04:v0.1.0. or registry.taichigraphics.com/taichidev-ubuntu18.04:v0.1.0

How to build and test:

  1. Create a container with nvidia-docker run --user dev -it -d --name container-name --gpus all -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix name:tag /bin/bash (let it run in detached mode to use the provided script)
  2. Execute your build and test by nvidia-docker exec --user dev -it container-name /home/dev/scripts/ubuntu_build_test.sh SHA="commit-sha-num" PY="py-ver"

For example, you can use nvidia-docker exec --user dev -it container-name /home/dev/scripts/ubuntu_build_test.sh SHA="c359935b81907945acba33d818933d89ec507089" PY="py38" to build and test Taichi in Python 3.8 with that specific commit. You can use either py36, py37, py38, py39.

@netlify
Copy link

netlify bot commented Oct 19, 2021

✔️ Deploy Preview for jovial-fermat-aa59dc canceled.

🔨 Explore the source changes: ecbc055

🔍 Inspect the deploy log: https://app.netlify.com/sites/jovial-fermat-aa59dc/deploys/616fbd10aadee800077c5072

ci/scripts/ubuntu_build_test.sh Outdated Show resolved Hide resolved
ci/scripts/ubuntu_build_test.sh Show resolved Hide resolved
Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

ci/scripts/ubuntu_build_test.sh Show resolved Hide resolved
ci/scripts/ubuntu_build_test.sh Outdated Show resolved Hide resolved
ci/scripts/ubuntu_build_test.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

Nice work! Thanks!

@qiao-bo qiao-bo merged commit 525c09a into taichi-dev:master Oct 22, 2021
@qiao-bo qiao-bo deleted the docker branch October 22, 2021 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants