Closed JimBeam2019 closed 3 years ago
Well that is a strange one!
Here is what I get when I run docker-compose build
:
neo4j uses an image, skipping
Building jupyterlab
Step 1/9 : FROM jupyter/datascience-notebook
---> 53a378c64e80
Step 2/9 : COPY requirements.txt ./
---> Using cache
---> 32047d06933d
Step 3/9 : RUN pip install -U pip
---> Using cache
---> 0b6c2fea69c3
Step 4/9 : RUN pip install --no-cache-dir -r requirements.txt
---> Using cache
---> e8c6db202a5f
Step 5/9 : ENV JUPYTER_ENABLE_LAB=yes
---> Using cache
---> 43dbcc9803e0
Step 6/9 : COPY --chown=${NB_UID}:${NB_GID} . /home/jovyan/work
---> 7d9ecc4756f5
Step 7/9 : WORKDIR /home/jovyan/work
---> Running in ff9640204af1
Removing intermediate container ff9640204af1
---> 0f9e017434bc
Step 8/9 : RUN python3 -m spacy download en_core_web_md
---> Running in 6743817fb9d9
Collecting en-core-web-md==3.0.0
Downloading https://github.com/explosion/spacy-models/releases/download/en_core_web_md-3.0.0/en_core_web_md-3.0.0-py3-none-any.whl (47.1 MB)
Requirement already satisfied: spacy<3.1.0,>=3.0.0 in /opt/conda/lib/python3.8/site-packages (from en-core-web-md==3.0.0) (3.0.3)
Requirement already satisfied: tqdm<5.0.0,>=4.38.0 in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (4.58.0)
Requirement already satisfied: pathy in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (0.5.2)
Requirement already satisfied: packaging>=20.0 in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (20.9)
Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (1.0.5)
Requirement already satisfied: spacy-legacy<3.1.0,>=3.0.0 in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (3.0.5)
Requirement already satisfied: typer<0.4.0,>=0.3.0 in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (0.3.2)
Requirement already satisfied: blis<0.8.0,>=0.4.0 in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (0.7.4)
Requirement already satisfied: setuptools in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (49.6.0.post20210108)
Requirement already satisfied: numpy>=1.15.0 in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (1.20.1)
Requirement already satisfied: thinc<8.1.0,>=8.0.0 in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (8.0.3)
Requirement already satisfied: srsly<3.0.0,>=2.4.0 in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (2.4.1)
Requirement already satisfied: catalogue<2.1.0,>=2.0.1 in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (2.0.4)
Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (2.0.5)
Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (3.0.5)
Requirement already satisfied: requests<3.0.0,>=2.13.0 in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (2.25.1)
Requirement already satisfied: wasabi<1.1.0,>=0.8.1 in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (0.8.2)
Requirement already satisfied: pydantic<1.8.0,>=1.7.1 in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (1.7.3)
Requirement already satisfied: jinja2 in /opt/conda/lib/python3.8/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (2.11.3)
Requirement already satisfied: pyparsing>=2.0.2 in /opt/conda/lib/python3.8/site-packages (from packaging>=20.0->spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (2.4.7)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /opt/conda/lib/python3.8/site-packages (from requests<3.0.0,>=2.13.0->spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (1.26.3)
Requirement already satisfied: idna<3,>=2.5 in /opt/conda/lib/python3.8/site-packages (from requests<3.0.0,>=2.13.0->spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (2.10)
Requirement already satisfied: chardet<5,>=3.0.2 in /opt/conda/lib/python3.8/site-packages (from requests<3.0.0,>=2.13.0->spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (4.0.0)
Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.8/site-packages (from requests<3.0.0,>=2.13.0->spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (2020.12.5)
Requirement already satisfied: click<7.2.0,>=7.1.1 in /opt/conda/lib/python3.8/site-packages (from typer<0.4.0,>=0.3.0->spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (7.1.2)
Requirement already satisfied: MarkupSafe>=0.23 in /opt/conda/lib/python3.8/site-packages (from jinja2->spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (1.1.1)
Requirement already satisfied: smart-open<4.0.0,>=2.2.0 in /opt/conda/lib/python3.8/site-packages (from pathy->spacy<3.1.0,>=3.0.0->en-core-web-md==3.0.0) (3.0.0)
Installing collected packages: en-core-web-md
Successfully installed en-core-web-md-3.0.0
WARNING: You are using pip version 21.1.1; however, version 21.1.2 is available.
You should consider upgrading via the '/opt/conda/bin/python3 -m pip install --upgrade pip' command.
✔ Download and installation successful
You can now load the package via spacy.load('en_core_web_md')
Removing intermediate container 6743817fb9d9
---> af84f050a06f
Step 9/9 : CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--notebook-dir=/home/jovyan/work", "--allow-root"]
---> Running in 23f9f3ccb9fc
Removing intermediate container 23f9f3ccb9fc
---> 78cec5ef7dac
Successfully built 78cec5ef7dac
It is interesting to me that in step 3 it is looking for conda while pip installing things. Mine doesn't do that at Step3, but I don't use conda and I do know that sometimes conda and pip do not play nicely with each other. Out of curiousity, do you use conda instead of pip as part of your daily workflow? If so, maybe can you try running this in a virtual environment that does not use conda and tell me what you get?
Thanks for raising this issue!
Also, can you maybe try commenting out line 4 of Dockerfile
(the one that updates pip)?
Hi @cj2001 , thank you very much for your comments, which help me fix the issue. I was running the project in the terminal of VS Code, and I spotted it ran a couple of command line as below, since you mentioned the unfriendly collaboration between conda and pip.
source /home/jimbeam/anaconda3/bin/activate
conda activate base
So, before docker-compose build
, I ran conda deactivate
and it worked smoothly without commenting out the pip update.
I can't thank you enough. Such a life saver. :D
I am so very glad to hear that, @JimBeam2019! Good luck with it and please reach out if you need anything else!
Hi there,
I'm having an issue when running
docker-compose build
. It seems to fail to build the HTTPS connection with pip (Error messages shown as below). May I ask how to fix it? Thanks.