Commit 1bc1acd1 by Eszter Schoell

template commit

parents
FROM jupyter/<notebook>:<version hash>
#Set the working directory
WORKDIR /home/jovyan/
# Modules
COPY requirements.txt /home/jovyan/requirements.txt
RUN pip install -r /home/jovyan/requirements.txt
# Add files
COPY notebooks /home/jovyan/notebooks
COPY data /home/jovyan/data
COPY solutions /home/jovyan/solutions
# Allow user to write to directory
USER root
RUN chown -R $NB_USER /home/jovyan \
&& chmod -R 774 /home/jovyan
USER $NB_USER
# Expose the notebook port
EXPOSE 8888
# Start the notebook server
CMD jupyter notebook --no-browser --port 8888 --ip=0.0.0.0 --NotebookApp.token='' --NotebookApp.disable_check_xsrf=True --NotebookApp.iopub_data_rate_limit=1.0e10
# ${COURSE TITLE GOES HERE}
![Powered by Jupyter Logo](https://cdn.oreillystatic.com/images/icons/powered_by_jupyter.png)
This project contains the Jupyter Notebooks and the associated Dockerfile for ${INSTRUCTOR} _${TITLE}_. It contains both the exercises (/notebooks) and the solutions (/solutions), as well as any data or files needed (/data).
This is a public repository so there is no need to create an account to download its contents. To download the source code from this page, click the 'Cloud' icon on the top right hand, above where the latest commit is detailed.
To download via git from your preferred terminal application, type:
```git clone https://resources.oreilly.com/live-training/${COMPLETE URL}```
## Running Jupyter Locally via Docker
We've shared the same Dockerfile we use for our JupyterHub session in this repository, to make sure you can run all of these notebooks in your own time, on your own machine. This isn't required during class, but can be useful for learning once the session is over.
You will need to have Docker installed on your system to create images and run containers. You can find the installation steps for all platforms on the company's [website](https://docs.docker.com/install/)
.
1) Clone the repository for the class either using the UI or your terminal (see above)..
2) Once you have Docker installed, type the following on your terminal to create a Docker image: `docker build -t NAME .` (replace `NAME`, here and in next step, with what you want to call it. Note the period)
3) That will take a little while to create a Docker image, but once completed, you can run your server with the following:
`docker run -p 8888:8888 NAME`
4) Head to `localhost:8888` in your browser and you will be able to access the Jupyter Notebooks.
FROM us.gcr.io/jupyterhub-170614/<series_id>:<single user version>
USER root
# notebook and ipykernel should already be installed. now just need jupyterhub
RUN pip install --upgrade --no-cache-dir jupyterhub==0.8.1
# Specify tornado==4.5.3
RUN pip install --upgrade --no-cache-dir tornado==4.5.3
USER jovyan
WORKDIR /home/jovyan
# css stuff
RUN for i in `find / -wholename /opt/conda/*/custom.css 2>/dev/null` ; \
do echo "@import url(\"https://cdn.oreillystatic.com/jupyterhub/jupyterhub-theme/custom/custom.css\")" \
| tee ${i}; done
CMD jupyterhub-singleuser \
--port=8888 \
--ip=0.0.0.0 \
--user="$JPY_USER" \
--cookie-name=$JPY_COOKIE_NAME \
--base-url=$JPY_BASE_URL \
--hub-prefix=$JPY_HUB_PREFIX \
--hub-api-url=$JPY_HUB_API_URL \
## Please list additional packages with version numbers
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment