To apply Jupyter Notebook customization copy the contents of Jupyter Notebook Changes/.jupyter to /home//.jupyter folder.
The following assumes a basic familiarity with webpack, npm package management, express.js servers and React.js. If not, this is a good place to get started with the modern web development workflow.
- Clone the repository using
git clone --recursive https://bitbucket.org/s3lab/web.git. - Change directory into
Web/UI. - Execute
npm install. This will install the required dependencies for the project. - To run the project in a local server, execute
npm start. This runs the project in a local webpack-dev server. It should automatically open the url in a browser window. It also supports hot-reloading meaning as soon as you make changes to the code, it is visible in the browser on refresh; no need to restart the server.
- Once the changes are done, push to the git repository using
git push origin master. - SSH into the server and clone into a folder as above. If the code is already present in the server do a
git pullto get the latest changes. - Then execute
npm install. If it doesn't automatically run the post-install script, also executenpm run-script postinstall. - To start the server execute
npm run-script prodornpm run-script prod &to have it in the background. This is setup to execute on port 80.
- The root of the project is in
Web\UI. Inside there are 3 folders:app,dist,semanticand a handful of files. - The
appfolder is where the actual code resides.index.jsis the entry point. - The
distfolder is where the final code gets compiled and built by webpack. Thesemanticfolder contains the files from the Semantic UI html framework which we use in combination with React.js. - The
appdirectory in turn has folders such ascomponents,configandcontainers. Thecontainersfolder has files which provide an abstraction on top of the actual UI code. The files in this directory contain all the functions needed for interaction with the UI components which are stored in the foldercomponents. The folderconfigstores theroutes.jsfile. This application makes use of the ReactRouter functionality androutes.jshas all the routing code. - The css and the dependent js code are in appropriately named folders.
- Go to the directory where the repository is cloned and cd into notebook.
- Execute the following commands:
sudo npm installsudo python setup.py buildsudo python setup.py installsudo pip install .
- Needs Python version >= 3.3 -- Might use virtualenv
- Go to the directory where the repository is cloned and cd into jupyterhub.
- Execute the following commands:
mkdir -p ~/jupyterhub-venvvirtualenv -p python3 ~/jupyterhub-venvsource ~/jupyterhub-venv/bin/activatesudo npm installsudo python setup.py buildsudo python setup.py install- If there is an error saying 'No module named
setuptools', executesudo apt-get install python3-setuptools sudo pip install .sudo npm isntall -g configurable-http-proxy
- Copy
.jupyterfolder from Jupyter Notebook Changes directory to $HOME - To change allowable URLs for CORS, look in the jupyter_notebook_config.py file.
- To start Jupyter Notebook as a background process, execute:
exec jupyter notebook --ip deepc05.acis.ufl.edu --port 8000 --config $HOME/.jupyter/jupyter_notebook_config.py &> /dev/null &