Closed romainGuiet closed 1 year ago
Hi @romainGuiet, thank you for sharing the issue.
I think the direct cause was shown in the following line.
96.66 fatal: unable to access 'https://github.com/ksugar/samapi.git/': Could not resolve host: github.com
It seems that it can happen when you connect to the internet using a proxy server.
If you have HTTP_PROXY
environment variable, you can pass it to docker build
as follows.
docker build -t samapi --build-arg HTTP_PROXY=${HTTP_PROXY} .
with the following Dockerfile
:
FROM nvcr.io/nvidia/pytorch:23.07-py3
ARG HTTP_PROXY
ENV PATH="~/miniconda3/bin:$PATH"
RUN mkdir -p ~/miniconda3 &&\
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh &&\
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 &&\
rm -rf ~/miniconda3/miniconda.sh &&\
conda update -n base -c defaults conda
# install samapi
COPY conda_envs/env_samapi.yml /tmp/env_samapi.yml
RUN conda env update -n samapi -f /tmp/env_samapi.yml \
&& conda clean --all -f -y \
&& conda env export -n "biop"
and the following condo_envs/env_samapi.yml
file:
name: "samapi"
channels:
- conda-forge
- defaults
dependencies:
- python=3.10
- cudatoolkit=11.7
- pip
- pip:
- git+https://github.com/ksugar/samapi.git
prefix: "/opt/conda/envs/samapi"
Please try it and let me know if it works.
Could it be because of https://github.com/ksugar/samapi/commit/ab8845eb131e96d41ed4a52ee9704aeba76135ad ?
I don't think this causes the issue because this is just a setting file for the VSCode. Anyway, it was pushed by mistake and I will remove this line in the next release.
Thanks @ksugar for your swift answer !
As far as I know , no proxy set ...
What I find weird is that with my previous yml :
name: "samapi"
channels:
- conda-forge
- defaults
dependencies:
- python=3.11
- pip
- pip:
- git+https://github.com/ksugar/samapi.git
prefix: "/opt/conda/envs/samapi"
it seems that the git clone works (see error above) but pip complains because now they are versions problems . I thought it could be due to the modification of the versions of torch in the commit https://github.com/ksugar/samapi/commit/ab8845eb131e96d41ed4a52ee9704aeba76135ad , file pyproject.toml , because the container I start from is torch >2 ( see doc )
so I modified my yml file to target the 0.3.0 :
name: "samapi"
channels:
- conda-forge
- defaults
dependencies:
- python=3.11
- pip
- pip:
- https://github.com/ksugar/samapi/archive/refs/tags/v0.3.0.tar.gz
prefix: "/opt/conda/envs/samapi"
and now it builds again... so I would guess the issue is not a proxy but some changes in the 0.3.1 ?
Best,
R
HI @romainGuiet , thank you for the update. Could you try again it with the following yml file?
name: "samapi"
channels:
- conda-forge
- defaults
dependencies:
- python=3.10
- cudatoolkit=11.7
- pip
- pip:
- https://github.com/ksugar/samapi/archive/refs/tags/v0.3.1.tar.gz
prefix: "/opt/conda/envs/samapi"
It is possible that a temporal network problem caused the previous error. From my understanding, the following error is related to a network problem.
96.66 fatal: unable to access 'https://github.com/ksugar/samapi.git/': Could not resolve host: github.com
In my environment, the following Dockerfile
and condo_envs/env_samapi.yml
work to build a Docker image for v0.3.1
without errors.
FROM nvcr.io/nvidia/pytorch:23.07-py3
ENV PATH="~/miniconda3/bin:$PATH"
RUN mkdir -p ~/miniconda3 &&\
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh &&\
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 &&\
rm -rf ~/miniconda3/miniconda.sh &&\
conda update -n base -c defaults conda
# install samapi
COPY conda_envs/env_samapi.yml /tmp/env_samapi.yml
RUN conda env update -n samapi -f /tmp/env_samapi.yml \
&& conda clean --all -f -y \
&& conda env export -n "biop"
name: "samapi"
channels:
- conda-forge
- defaults
dependencies:
- python=3.10
- cudatoolkit=11.7
- pip
- pip:
- git+https://github.com/ksugar/samapi.git
prefix: "/opt/conda/envs/samapi"
I just tested consequently and everything works now 🤯
name: "samapi"
channels:
- conda-forge
- defaults
dependencies:
- python=3.10
- cudatoolkit=11.7
- pip
- pip:
- git+https://github.com/ksugar/samapi.git
prefix: "/opt/conda/envs/samapi"
and
name: "samapi"
channels:
- conda-forge
- defaults
dependencies:
- python=3.10
- cudatoolkit=11.7
- pip
- pip:
- https://github.com/ksugar/samapi/archive/refs/tags/v0.3.1.tar.gz
prefix: "/opt/conda/envs/samapi"
So I really don't know what was going wong...
Thank you again 🙏
Cheers,
R
Hi @ksugar ,
With docker I created (16 days ago) a conda env (using a yml file) to create a samapi environment (see below )
DockerFile
env_samapi.yml
But now I get an error
I tried to modify to the version below (from the updated README)
but still get an ERROR :
Could it be because of https://github.com/ksugar/samapi/commit/ab8845eb131e96d41ed4a52ee9704aeba76135ad ?
Thank you for your inputs,
Cheers,
R