Closed escorciav closed 4 years ago
I found this Dockerfile, but it looks a bit old.
@escorciav some tips on Docker:
docker run -it -v $PWD:/vagrant <image> bash
FROM <image>
USER root
ADD . /vagrant
RUN build.sh
Note that I use /vagrant
here, because I work primary in VMs. We use the same scripts to build Vagrant boxes.
Thanks for getting back.... based on the repo that I mentioned above, I used the snipped below in my Dockerfile
. It did the job for me:
ENV PYENV_ROOT="/data/.pyenv" \
PATH="/data/.pyenv/bin:/data/.pyenv/shims:$PATH"
RUN mkdir -p /data
WORKDIR /data
RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
RUN pyenv update \
&& pyenv install 3.6.8 \
&& pyenv virtualenv 3.6.8 general \
&& pyenv global general
I let the image building... 🤞 the other packages (build by cmake) will find the appropriate Python.h
.
Closing the issue as it looks out of the scope of this repo. Sorry about that.
Stay safe and healthy!
No worries! Thank's for posting your solution :)
Minor update the snippet above likely built my image successfully (opencv, and other gazzilion of dependencies 😅 ).
I only have an issue with a particular dependency (decord) where the Dockerfile is trying to do python setup.py install --user
. Even in that case pyenv
pointed towards setuptools
documentation for alternatives on how to build it 👏 . I skipped it as I don't plan to use that for the time being.
Hi guys,
I want to add pyenv into a 3rdparty project using Docker. Do you mind to gimme a hand?
Could you please confirm that the corresponding header files such as
Python.h
can be found for a particular python version?It's unclear how to do the PATH updates such that the container route to
Thanks in advance!
P.D. I know that it's not the principle solution, but I'm not familiar with the 3rdparty project and only know the basics of Docker. I do use Unix, but not very familiar with ubuntu (distro used in the Dockerfile of the project 😓)