Skip to content

Conversation

@gs-olive
Copy link
Contributor

Description

  • Upgrade Ubuntu version to 22.04
  • Make custom build args for TensorRT and CUDNN versions, user-specifiable in a.b.c version format
  • Make build args required, without defaults, to improve code cleanliness and reduce amount of changes needed when versions shift
  • Provide clear error messages when the build args are not provided by the user
  • Add documentation of the change in the Docker README

Fixes#1782

Type of change

Please delete options that are not relevant and/or add your own.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • [ x ] My code follows the style guidelines of this project (You can use the linters)
  • [ x ] I have performed a self-review of my own code
  • [ x ] I have commented my code, particularly in hard-to-understand areas and hacks
  • [ x ] I have made corresponding changes to the documentation
  • [ - ] I have added tests to verify my fix or my feature
    • Build tested locally
  • [ x ] New and existing unit tests pass locally with my changes
  • [ x ] I have added the relevant labels to my PR in so that relevant reviewers are notified

- Upgrade Ubuntu version to 22.04 - Make custom build args for TensorRT and CUDNN versions, user-specifiable in a.b.c version format - Make build args required, without defaults, to improve code cleanliness and reduce amount of changes needed when versions shift - Provide clear error messages when the build args are not provided by the user - Add documentation of the change in the Docker README
@gs-olivegs-olive added WIP Work is in progress, pull request should not be merged yet and removed WIP Work is in progress, pull request should not be merged yet labels Apr 6, 2023
RUN cp ./docker/WORKSPACE.docker WORKSPACE

# Symlink the path pyenv is using for python with the /usr/local/lib/ for package sourcing
RUN ln -s "`pyenv which python | xargs dirname | xargs dirname`/lib/python$PYTHON_VERSION/site-packages""/usr/local/lib/python"
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Since pyenv puts the packages for the distribution in a different location, create a symbolic link to an unchanging path, which is then used in the WORKSPACE files to source libtorch.

@gs-olivegs-oliveforce-pushed the docker_improvements branch 2 times, most recently from bea8814 to 7b1707bCompareApril 10, 2023 23:40
- Add support for pyenv in Docker file, allowing specification of a custom Python version - Update WORKSPACE files to automatically synchronize regardless of Python version choice, using symbolic links - Update dependencies accordingly - Add documentation for changing the base image of the Docker container
@gs-olivegs-oliveforce-pushed the docker_improvements branch from 7b1707b to a26438eCompareApril 11, 2023 17:29
Copy link
Collaborator

@narendasannarendasan left a comment

Choose a reason for hiding this comment

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

LGTM

- Add documentation regarding Python versioning
@gs-olivegs-olive merged commit e20d70a into pytorch:mainApr 13, 2023
@gs-olivegs-olive deleted the docker_improvements branch April 13, 2023 00:04
Sign up for freeto 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.

✨[Feature] Upgrade Docker to Ubuntu 22.04 + Add build-args for TensorRT + cuDNN versions

3 participants

@gs-olive@narendasan@facebook-github-bot