After installing pytorch via
RUN python3 -m pip install --no-cache-dir torch==1.9.1
I realised that corresponding docker layer is 1.78GB Is there any way to reduce pytorch size? Current version is with GPU & Cuda 10.2
After installing pytorch via
RUN python3 -m pip install --no-cache-dir torch==1.9.1
I realised that corresponding docker layer is 1.78GB Is there any way to reduce pytorch size? Current version is with GPU & Cuda 10.2
If you are not using gpu with your docker container, the cpu version will be much smaller since it does not contain all the overhead of CUDA. To have a cpu only version you can use :
RUN python3 -m pip install --no-cache-dir torch==1.9.1+cpu
Also you can use wheel files (.whl) to install pytorch, this approach also can be viable if you want to trim some unnecessary components. You can find it on pytorch website:
© 2022 - 2024 — McMap. All rights reserved.