Jan-25-2021, 09:13 PM
(This post was last modified: Jan-25-2021, 09:13 PM by coreyhanson.)
I've been getting some unexpected behavior when creating a wheel for a manual build of Pytorch. If I decide to just directly install it (using python 3.8), it works perfectly, but if I try to save those files to a wheel, and install from directly from that it suddenly decides that python 3.7 and under should be required.
This is bash code, but the problem is python based
Is there a way to force the wheel to behave as expected and respect the specs of the environment that built it?
This is bash code, but the problem is python based
# I'm doing it inside a custom conda environment source activate $CONDA_ROOT # Just a temp directory to save out the wheel to mkdir /opt/conda/wheel-pytorch git clone https://github.com/pytorch/pytorch.git cd pytorch git submodule sync && git submodule update --init --recursive TORCH_CUDA_ARCH_LIST="3.5 5.2 6.0 6.1 7.0+PTX" TORCH_NVCC_FLAGS="-Xfatbin -compress-all" \ CMAKE_PREFIX_PATH="$(dirname $(which conda))/../" \ # If these last two lines are replaced with a simple "pip install -v" . , the install works pip wheel . --wheel-dir=/opt/conda/wheel-pytorch pip install --no-index --find-links=/opt/conda/wheel-pytorch -r requirements.txtThis is what happens when trying to run the above code. It breaks the Dockerfile that I'm creating it with (for the purpose of a non-bloated multistage build)
Error:Looking in links: /opt/conda/wheel-pytorch
Ignoring dataclasses: markers 'python_version < "3.7"' don't match your environment
ERROR: Could not find a version that satisfies the requirement future
ERROR: No matching distribution found for future
I suspect that some of the dependencies might be responsible for asking for the wrong python version, but why would it break during an install using the wheel (with the same exact version) if it worked on the standard install.Is there a way to force the wheel to behave as expected and respect the specs of the environment that built it?