Skip to content

Commit 44e4ffa

Browse files
authored
fix: Add python3 symlink in final container (#2085)
1 parent bd9c29a commit 44e4ffa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docker/Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ RUN bash ./docker/dist-build.sh
9494
FROM base as torch-tensorrt
9595

9696
COPY . /opt/torch_tensorrt
97+
98+
# Symlink the path pyenv is using for python with the /opt directory for package sourcing
99+
RUN mkdir -p "/opt/python3/" &&\
100+
ln -s "`pyenv which python | xargs dirname | xargs dirname`/lib/python$PYTHON_VERSION/site-packages" "/opt/python3/"
101+
97102
COPY --from=torch-tensorrt-builder /workspace/torch_tensorrt/src/py/dist/ .
98103

99104
RUN cp /opt/torch_tensorrt/docker/WORKSPACE.docker /opt/torch_tensorrt/WORKSPACE

0 commit comments

Comments
 (0)