Skip to content

Commit

Permalink
First version
Browse files Browse the repository at this point in the history
  • Loading branch information
troelspetersen committed Mar 19, 2024
1 parent 1bae0dc commit dc5e644
Show file tree
Hide file tree
Showing 50 changed files with 416 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/ML-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: ML
channels:
- apple
- conda-forge
- bioconda
dependencies:
- pip=22.0.4=pyhd8ed1ab_0
- python=3.9.0=h4b4120c_5_cpython
- scikit-learn=1.0.2=py39hef7049f_0
- tensorflow-deps=2.8.0=0
- pip:
- tensorflow-macos==2.8.0
- tensorflow-metal==0.4.0
12 changes: 12 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

[return to the main page](../README.md)

# AppML2024 - Instructions for installing the repository locally
---


* [__Instructions for Linux__](install_instruction_linux.md)

* [__Instructions for Windows 10__](install_instruction_windows10.md)

* [__Instructions for MacOs Mojave__](install_instruction_macos_mojave.md)
1 change: 1 addition & 0 deletions docs/how_to_use_this_git.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Working with the code repository
62 changes: 62 additions & 0 deletions docs/install_instruction_erda.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[Back to main installation page](README.md)

## Installation instruction - ERDA

Since the software environment on ERDA already includes all the software tools necessary to run the notebooks, the only thing that has to be done there is to clone the code repository in your local workspace.


### Logging on to ERDA and cloning the code repository
---

#### Get Registered on ERDA (email [Troels](mailto:[email protected]) to get registered)

#### [Get a github account](https://github.com/).

If you do not wish to do so, you can still access the course content by manually downloading the repository (see __Option C__ below)

#### Clone the Applied Statistics Repository


<details><summary>From your ERDA homepage, click on the <b>jupyter</b> option in the side menu</summary>
<img src="/images/ERDA_step1.png"
title="ERDA main menu"/>
</details>


<details><summary>Start a terminal session by clicking the <b>Start DAG</b> button</summary>
<img src="/images/ERDA_step2.png"
title="ERDA main menu"/>
</details>



<details><summary>To spawn the correct environment for the course, select the option <b>Statistics Notebook with Python</b> </summary>
<img src="/images/ERDA_step3.png"
title="ERDA main menu"/>
</details>



<details><summary>Open the <b>Terminal</b> option </summary>
<img src="/images/ERDA_step4.png"
title="ERDA main menu"/>
</details>


You should now have a terminal window opened in your screen. If you type in the command `ll`, you should see a list of folder in your space. Move into the __work__ folder by typing the command `cd work`.

<details><summary>Click here to see the image</summary>
<img src="/images/ERDA_step5.png"
title="ERDA main menu"/>
</details>


Once you are in your __work__ folder, make yourself a local copy of the code repository by typing the command
`git clone https://https://github.com/troelspetersen/AppliedML2024 .`

If you list the content of your __work__ directory, you should now see a local copy of the code appear on your machine.

<details><summary>Click here to see the image</summary>
<img src="/images/ERDA_step6.png"
title="ERDA main menu"/>
</details>
66 changes: 66 additions & 0 deletions docs/install_instruction_linux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[Back to main page](../README.md)


## Installation instruction - Linux system

These steps have been tested on a Linux Mint 18, a variant of the Ubuntu flavour of linux systems.



### Installing the Anaconda environment

In order to run the exercices from the course, you will need to setup and install __anaconda for python 3__.


<details><summary>On the [anaconda website](https://www.anaconda.com/distribution/), download the python 3.7 version of anaconda. ake sure you are downloading the version that matches your <b>processor type </b> (you should download the x86 installer)</summary>
<img src="../images/anaconda_install1.png"/>
</details>

In the folder where you downloaded the installation script, run the latter using `bash Anaconda3-2019.10-Linux-x86_64.sh`. Type `enter` to start the process
<details><summary>Click here for image </summary>
<img src="../images/anaconda_install2.png"/>
</details>



Scroll through the licence agreement by pressing the return key. At the end, type `yes` to accept the license terms and conditions.
<details><summary>Click here for image </summary>
<img src="../images/anaconda_install3.png"/>
</details>


Anaconda provides you with a default path where it will install the relevant software. It is recommended that you change this directory name, like the example shown here. Once you have entered a new path name, type the return key and the installation will proceed.
<details><summary>Click here for image </summary>
<img src="../images/anaconda_install4.png"/>
</details>



Once the installation is finished, you will be asked if you ant to initialize the environment. __Type `no` to this step__.
<details><summary>Click here for image </summary>
<img src="../images/anaconda_install5.png"/>
</details>


Move to your home folder by typing `cd`. Open a file named `.bashrc`, and add the following line at the bottom of the file:
`alias anaconda3="export PATH=/home/username/some_path_name/bin:$PATH;source /home/username/some_path_name/bin/activate"`


Close your terminal and open a new one. When you type in `anaconda3`, your new anaconda environment should load. You are then ready to work on your notebooks.


### Clone the course repository

* Open a __terminal window__.

* If you don't have git installed on your laptop, install it by following [these instructions](https://gist.github.com/derhuerst/1b15ff4652a867391f03#file-linux-md)

* Clone the Applied ML repository using the command
`git clone https://github.com/AppliedMachineLearningNBI/AppliedML2024.git .`

Feel free to choose another name for your folder, or just use "." if you want to use the same name (i.e. "AppliedML2023"), which is default/common.

* You now have a local copy of the repository


__Make sure you run the command__ `anaconda3` before running a notebook.
51 changes: 51 additions & 0 deletions docs/install_instruction_macos_mojave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

[Back to main page](../README.md)



## Installation instruction - MacOs

These instructions have been tested on a macbook pro from 2015 running the Mojave OS.


### Download Anaconda3

* Go to the [anaconda website] and download the __Command line installer__ for Mac.


<details><summary>Click to see snapshot</summary>
<img src="../images/anaconda_install_mac_1.png"/>
</details>


* In the __Launchpad__, find and click on the __Terminal__ icon.


* Once in the terminal, run the __anaconda installer__, by typing

`bash $HOME/Downloads/Anaconda3-2019.10-MacOSX-x86_64.sh`


* Scroll through the terms of the license and type `yes` to accept. You will be asked to define a path where anaconda can be installed. Feel free to use the pathname you want (we would suggest `/Users/your_username/AppliedStatistics/anaconda3/`)


* Anaconda will now install itself. At the end of the process, you will be asked if you want to initialize anaconda. __Type "No"__


* Move back to your home directory by typing `cd $HOME`. Open a file called `.bash_profile`, and type in at the bottom of the file the following line:

`alias anaconda3=". /path/where/you/saved/anaconda3/etc/profile.d/conda.sh; conda activate base"`


* Close your terminal and reopen a new one. To run anaconda, type in the command:

`anaconda3`


### Clone the Applied Statistics Repository

* In a folder of your choice, run the command for cloning the repository:

`git clone https://github.com/AppliedMachineLearningNBI/AppliedML2024.git .`

To run a notebook, make sure you activate your anaconda environment by typing `anaconda3`. You are now set to work on the notebooks!
122 changes: 122 additions & 0 deletions docs/install_instruction_windows10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@

[Back to main page](../README.md)


## Installation instruction - Windows

### __NOTE: WINDOWS INSTRUCTIONS ARE UNLIKELY TO WORK ON OLDER VERSIONS OF WINDOWS. IF YOU DON'T HAVE WINDOWS 10, WE RECOMMEND YOU DO YOUR WORK ON ERDA INSTEAD OF YOUR OLD LAPTOP__



### Installing Anaconda on Windows 10
---
These steps have been tested on an up-to-date version of Windows 10 (admittedly, only tested/updated Nov. 4 2019).

On the [anaconda website](https://www.anaconda.com/distribution/), download the python 3.7 version of the anaconda installer for windows. __Make sure to select the right file for your system (32-bit or 64-bit)__

<details><summary>Click here for a picture</summary>
<img src="../images/anaconda_windows_1.png"/>
</details>

Launch the installer program, and click __next__.
<details><summary>Click here for a picture</summary>
<img src="../images/anaconda_windows_2.png"/>
</details>

Click on __I agree__ at the bottom of the licence.
<details><summary>Click here for a picture</summary>
<img src="../images/anaconda_windows_3.png"/>
</details>


Select the __Just me__ option.
<details><summary>Click here for a picture</summary>
<img src="../images/anaconda_windows_4.png"/>
</details>


Select the folder where you want to install anaconda and click on __Next__.
<details><summary>Click here for a picture</summary>
<img src="../images/anaconda_windows_5.png"/>
</details>


Make sure that both options are unchecked and click __install__.
<details><summary>Click here for a picture</summary>
<img src="../images/anaconda_windows_6.png"/>
</details>


Once the installation finishes, click on __Next__.
<details><summary>Click here for a picture</summary>
<img src="../images/anaconda_windows_7.png"/>
</details>


Click on __Finish__ to complete the installation
<details><summary>Click here for a picture</summary>
<img src="../images/anaconda_windows_8.png"/>
</details>

### Installing iminuit

Iminuit should already be installed on the windows version of anaconda.


### Cloning the git repository
---
Download [git for windows](https://git-scm.com/download/win) and download the installer for your system (32-bit or 64-bit)
<details><summary>Click here for a picture</summary>
<img src="../images/git_windows_1.png"/>
</details>

Run the installer. Click on Next
<details><summary>Click here for a picture</summary>
<img src="../images/git_windows_2.png"/>
</details>

Select a location where to install git (it is recommended to use the default path)
<details><summary>Click here for a picture</summary>
<img src="../images/git_windows_3.png"/>
</details>

In the select Components window, leave the options checked to default. Make sure that __Git Bash__ is checked
<details><summary>Click here for a picture</summary>
<img src="../images/git_windows_4.png"/>
</details>

Keep clicking on __Next__ through the various options, leaving them at their default values.
<details><summary>Click here for a picture</summary>
<img src="../images/git_windows_5.png"/>
<img src="../images/git_windows_6.png"/>
<img src="../images/git_windows_8.png"/>
<img src="../images/git_windows_9.png"/>
<img src="../images/git_windows_10.png"/>
<img src="../images/git_windows_11.png"/>
<img src="../images/git_windows_12.png"/>
</details>


Keep clicking on __Install__. Leave the option on that window unchecked.
<details><summary>Click here for a picture</summary>
<img src="../images/git_windows_13.png"/>
</details>


Keep clicking on __Finish__ after the process is completed.
<details><summary>Click here for a picture</summary>
<img src="../images/git_windows_14.png"/>
</details>

Once this is done, open the __Windows Explorer__ window, create a new folder where you want to save the repository, and right click inside that folder. There should now be an option in the menu called __Git Bash Here__

<details><summary>Click here for a picture</summary>
<img src="../images/git_windows_15.png"/>
</details>

The previous steps opens a terminal window at the location you created. In that terminal window, type in the command:
`git clone https://github.com/AppliedMachineLearningNBI/AppliedML2024.git .`

<details><summary>Click here for a picture</summary>
<img src="../images/git_windows_gitterminal.png"/>
</details>
42 changes: 42 additions & 0 deletions docs/manual_copy_of_code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[Back to main page](../README.md)


### Option C. Manually downloading the course content
---

If you do not want to subscribe to github, you can still download manually the content of the repository using the __donwload zip__ option on the main page of this git.

<details><summary>Click here to see the image</summary>
<img src="/images/ERDA_zip0.png"/>
</details>


To upload the archive on ERDA, go to your main page, on the __Files__ section and right click on the window on the right side. Select the __upload__ button
<details><summary>Click here to see the image</summary>
<img src="/images/ERDA_zip1.png"/>
</details>


Type in a folder name in __Optional final destination dir__ if you want to save it in a folder other than your home diretory. Start the upload by clicking on the __Start__ button.
<details><summary>Click here to see the image</summary>
<img src="/images/ERDA_zip2.png"/>
</details>


You should now see the zip archive in the folder you saved it to. To unzip the archive, right click on it and select the __unpack__ option.
<details><summary>Click here to see the image</summary>
<img src="/images/ERDA_zip3.png"/>
</details>



Enter a path name for where you want to have your unzipped archive (optional). Click on __Ok__. Your folder is now unpacked and you should be able to work in it
<details><summary>Click here to see the image</summary>
<img src="/images/ERDA_zip4.png"/>
</details>


__Important note regarding a manual download:__ If you choose this method to get the course content, you will have to download a new version of the archive everytime we update an exercice or correct a mistake in the notebooks. __It is therefore highly recommended that you use github instead.__


__Other important Note__: You will also need to install additional software if you are running things on your laptop.
Loading

0 comments on commit dc5e644

Please sign in to comment.