Sign inSign up

hhwang927/jupyter

By hhwang927

•Updated about 3 years ago

based on hhwang927/gunicorn, pip install jupyter lab, apt install cron, pip install papermill[all]

Image
0

1.7K

hhwang927/jupyter repository overview

based on hhwang927/gunicorn, I did this:

⁠install jupyterlab

pip install jupyterlab

⁠setting up the docker image

⁠STEP 0: generate jupyter config file

$ pip install jupyterlab
$ jupyter notebook --generate-config

⁠STEP 1: USING SSL FOR ENCRYPTED COMMUNICATION

$ mkdir -p /root/.jupyter/certificate
$ cd /root/.jupyter/certificate
$ openssl req -x509 -nodes -days 1095 -newkey rsa:2048 -keyout mycert.pem -out mycert.pem

⁠STEP 2: JUPYTER NOTEBOOK SETTING UP

Open /root/.jupyter/jupyter_notebook_config.py with your favourite text editor and edit the following

# Set options for certfile, ip, password, and toggle off
# browser auto-opening
c.NotebookApp.certfile = u'/root/.jupyter/certificate/mycert.pem'
c.NotebookApp.keyfile = u'/root/.jupyter/certificate/mycert.pem'
# Set ip to '*' to bind on all interfaces (ips) for the public server
c.NotebookApp.ip = '*'
c.NotebookApp.password = u'sha1:bcd259ccf...<your hashed password, you can find it in the jupyter_notebook_config.json file>'
c.NotebookApp.open_browser = False
c.NotebookApp.allow_root = True

# It is a good idea to set a known, fixed port for server access
c.NotebookApp.port = 8888

⁠STEP 3: install nodejs 14

go to the work directory, and

curl -sL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs

⁠STEP 4: install plugins using jupyter lab web interface

⁠STEP 5: install frequently used libs

pip install requests SQLAlchemy cssselect docx python-docx beautifulsoup4 pyquery selenium

⁠STEP 6: for support of Microsoft SQL server

curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -

#Ubuntu 18.04
curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list

apt-get update
ACCEPT_EULA=Y apt-get install -y msodbcsql17
# optional: for bcp and sqlcmd
ACCEPT_EULA=Y apt-get install -y mssql-tools
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc
# optional: for unixODBC development headers
apt-get install -y unixodbc-dev

pip install pyodbc

⁠STEP 7: for support of plotly

pip install plotly plotly_express
jupyter labextension install jupyterlab-plotly

Tag summary

Content type

Image

Digest

Size

1.4 GB

Last updated

over 4 years ago

docker pull hhwang927/jupyter