-
Notifications
You must be signed in to change notification settings - Fork 364
feat: Upgrade Docker build to use custom TRT + CUDNN #1805
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
- 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
docker/Dockerfile
Outdated
|
||
FROM torch-tensorrt-builder-base as torch-tensorrt-builder | ||
|
||
COPY . /workspace/torch_tensorrt/src | ||
WORKDIR /workspace/torch_tensorrt/src | ||
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" |
There was a problem hiding this comment.
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.
bea8814
to
7b1707b
Compare
- 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
7b1707b
to
a26438e
Compare
There was a problem hiding this 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
Description
Fixes #1782
Type of change
Please delete options that are not relevant and/or add your own.
Checklist: