python setup.py develop yields outputs that can be checked here, left output is the result of running the command within the Dockerfile with
RUN python setup.py develop, while the right side is the output of
CMD [ "python", "setup.py", "develop"] or
ENTRYPOINT [ "python", "/app/src/setup.py", "develop"] or connecting to an interactive shell and executing the command there.
FROM pytorch/pytorch:1.8.0-cuda11.1-cudnn8-devel as base RUN apt-get update && apt-get install -y git g++ ninja-build unrar RUN conda install -c conda-forge plyfile debugpy scipy RUN usermod -a -G video root WORKDIR /app RUN git clone https://github.com/facebookresearch/SparseConvNet RUN mv SparseConvNet src WORKDIR /app/src ENV MAX_JOBS=12 RUN rm -rf build/ dist/ sparseconvnet.egg-info sparseconvnet_SCN*.so RUN python setup.py develop # CMD [ "python", "/app/src/setup.py", "develop"] # ENTRYPOINT [ "python", "/app/src/setup.py", "develop"]
I have also tried using the exec instead of the shell form, setting the shell to use /bin/bash and setting some env variables manually, like CUDA_HOME, CUDA_VERSION, CUDA_VISIBLE_DEVICES, FORCE_CUDA, but to no avail.
I have also verified that the environment variables are the same, the python path is the same, and the shell (/bin/bash)is the same. There is difference whether I run using nvidia-docker or docker.
My docker version is 20.10.7, build f0df350.
Suggestions are much appreciated.
Source: Docker Questions