The environment for the course: practical machine learning
There are at least two dimensions to how to setup the environment: physical and logical.
- local machine (e.g. laptop)
- cloud (e.g. Google Cloud or Amazon)
- something between :D
- bash script - install one by one (e.g. by using bash script
setup.sh
) - docker
- Prepare a machine (the script have tested on Ubuntu 16.04)
Note. Example, how to setup GCC.
- Log in to the machine via ssh
Here is an example how to quick login via ssh on GCC. Note your machine should be running.
Wait some time (up to 10 secs).
3. Download bash script: wget https://raw.githubusercontent.com/dataworkshop/course_env/master/setup.sh
- Run it:
bash setup.sh
- It took some time (be patient)
- Test it (e.g. type in the console
ipython
) - Be happy :)
To run jupyter you should remember about few things:
- first of all open a port (e.g. 8889). You can find some details how to open ports for Google Cloud or Amazon
- You need run jupyter's process in the smart way (when you log out, then the juypter's process still should exist). For this you can use e.g. screen. When you type:
screen -S jupyter
you will create a session. After you you can run some command there. To detach session:CTRL + A + D
. To attach:screen -x jupyter
. Note,jupyter
it's just a name for this case, it can be something else (e.g.elephant
). - To run jupyter's notebooks, type this command:
jupyter notebook --no-browser --port 8889
. Remeber about token.
Pull or build docker images:
docker pull dataworkshop-env
docker build -t dataworkshop-env .
docker run -d --name dataworkshop-notebook -v /path/to/modules/:/home/workspace/modules/ -p 8888:8888 dataworkshop-env
docker logs dataworkshop-notebook
localhost:8888
or another remote host address