First of all, you will need to clone this repository:
$ git clone https://github.com/lcbm/cs-machine-learning.git
Instead of having you go through the hassle of downloading a bunch of dependencies to your system and dealing with all sorts of conflicts, configurations and so on... we will be using Docker! If this is new to you, don't worry - we will guide you through the process π
Feeling curious? Here's an awesome list with a ton of Docker resources, for you to take a look!
Okay, maybe you will have go through some software installation... but I promise that it will only be these two and that after installing Docker
and Docker-compose
, you won't ever have worry about project dependencies conflicting with system ones anymore π€©
To install them, please follow the instructions in the links below:
note: if you're using a Linux system, please take a look at Docker's post-installation steps for Linux!
Once you have Docker
and Docker-compose
, change your current working directory to this repository then build and run the container:
# change current working directory
$ cd <path/to/cs-machine-learning>
# start the container in the background of your terminal
$ docker-compose up --detach
At this point, Jupyter Notebook will be running at: http://localhost:8888
There are a few ways you may install packages to the container. It'll depend on your goal and needs.
If you need to do update or add packages via pip
, execute the following command inside your jupyter notebook:
import sys
# install a pip package in the current Jupyter kernel
!{sys.executable} -m pip install <package>
note: the
!
notation is used to runpip
directly as a shell command from the notebook. Also, take a look here to see why you should NOT use!pip install <package>
.
If you need to do update or add packages via conda
, execute the following command inside your jupyter notebook:
import sys
# install a conda package in the current Jupyter kernel
!conda install --yes --prefix {sys.prefix} <package>
note: the
!
notation is used to runconda
directly as a shell command from the notebook. Also, take a look here to see why you should NOT use!conda install --yes <package>
.
To add or update system packages, you will need root
user permissions. To achieve this, use the following command:
# execute the container's shell
$ docker exec -it --user root tensorflow_notebook /bin/bash
# install a package to the system the container runs on
$ sudo apt install <package>
Once you're done, you may remove what was created by docker-compose up
:
# change current working directory
$ cd <path/to/cs-graph-theory/pyspark>
# stop containers and removes containers, networks, volumes, and images created by `docker-compose up`
$ docker-compose down
If you are interested in helping contribute to the project, please take a look at our Contributing Guide.
Copyright Β© 2020-present, CS Machine Learning Contributors. This project is ISC licensed.