Install Jupyter Notebook Server, including the additional pip package, without internet
access.
About this task
When installing Jupyter Notebook Server, you may have additional packages listed within
additional_pip_packages.txt. This task requires internet access, which in some
cases might not be available. So you need to download the package before installing Jupyter.
Procedure
- Locate the tar.gz file for your specific package online, and
download it.
The Python Package Index (PyPI) pypi.org (https://pypi.org) website can be used to download most pip packages from the
source.
- Navigate to the C:\Program Files\ibm\cognos\jupyter\dist\scripts
directory, and create a new directory named tmp.
- Place all of the tar.gz packages that you downloaded into the
tmp directory.
- Open the file C:\Program
Files\ibm\cognos\jupyter\dist\scripts\Dockerfile_server_instance for
editing.
- Modify the file in the following way:
- Under the line
COPY additional_pip_packages.txt /home/ca_user
add the following new line
COPY tmp/ /tmp/
This line instructs Docker to take your packages, and place them into the Docker container during
the build.
- Comment out the following section:
#COPY additional_conda_packages.txt .
#RUN if [ -s additional_conda_packages.txt ]; then \
# conda install --yes --file additional_conda_packages.txt; \
# fi \
#&& rm additional_conda_packages.txt
- Save the Dockerfile_server_instance file ensuring that it's saved
without a file extension.
- Open the file C:\Program
Files\ibm\cognos\jupyter\dist\scripts\additional_pip_packages.txt for
editing.
- Modify the file in the following way:
- Remove the line listing the existing package name and version.
- Add the following new line
/tmp/<package-name>.tar.gz
. Ensure that
the path matches the exact name of your tar.gz file.
- Add a new line for every package that you want to install this way.
- Save the additional_pip_packages.txt file.
- Run the Windows installation script by using the following command:
C:\Program
Files\ibm\cognos\jupyter\dist\scripts\windows\install.bat
.