NOTE
Watch instruction videos at YouTube
Install the following Applications on your Laptop / MacBook and make sure to use your email address of the Hogeschool Rotterdam for any user account
To be able to use the resources from this repository on your local machine and push code to your own (forked) remote git repository, you need to have remote access to Github.
-
Create an account at Github
-
Install Git
Make sure you select "Checkout as-is, commit Unix-style line endings" during the installation process.
-
Install Homebrew (MacOS only)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
Install iterm2 (MacOS)
brew install iterm2
-
Install zsh (MacOS and Ubuntu)
-
Install zsh on MacOS using
brew install zsh
In Ubuntu
sudo apt install zsh
-
Add iTerm2 path to zsh profile
echo "eval \"\$(homebrew/bin/brew shellenv)\"" >> ~/.zshrc
-
(Optional) Install oh-my-zsh (MacOS and Ubuntu)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
-
-
Install GitHub CLI (MacOS and Ubuntu)
brew install gh
NOTE
Although you could download and install GitHub CLI for Windows, I don't recommend it since it does not properly work in Git Bash. -
Create a ssh key-pair token
Start a (git) bash shell *and generate a secret key pair with your student email adress
ssh-keygen -t Ed25519 -C {your_username@student.hr.nl} -
Transfer your public key to Github
If you installed the GitHub client, you can authenticate with the following command in the terminal and select ssh for authentication
gh auth login
otherwise enter the following in (git) bash shell to view the contents of your public key
cat ~/.ssh/id_ed25519.puband paste this in the text area when adding a new ssh key in GitHub
-
Create a fork of this repository
Create a fork of MitwRdam/MakeAIWork in GitHub or use the GitHub Client by entering the following commands in your terminal
gh repo fork https://github.com/MitwRdam/MakeAIWork
-
Clone your fork If you installed the GitHub client, you can authenticate with the following command in the terminal
gh repo clone git@github.com:{your_github_username}/MakeAIWork.gitotherwise enter the following command in your (git)bash shell after replacing {your_github_username} with your GitHub username.
git clone git@github.com:{your_github_username}/MakeAIWork.git -
Configure git
In order to commit and push your changes, you need identitify yourself.
Open a (git)bash, enter directory MakeAIWork and run:
install/git_config.sh {your_github_username} {your@student.email.com}This script will also set the pull policy to rebase.
-
Add upstream to original remote repository
To be able To be able to fetch and merge changes from this repository using (bash) commands, you need to have a (second) upstream.
If you used the GitHub client to create the fork you can skip this step, otherwise enter the following commandsgit remote add mitwrdam https://github.com/MitwRdam/MakeAIWork
-
Keep your fork repository up-todate by regularly pulling changes from the original remote repository into your local fork..
git pull mitwrdam main
and push the changes to you remote fork
git push
-
Install python
-
Install Miniconda (MacOS and Linux)
Download and install Miniconda
-
Create virtual Python environment
install/create_virtual_env.sh
-
Install Python libraries
install/install_requirements.sh
-
Test your Python Installation
-
Enter the following command in your Terminal or Git Bash
python
this will start the REPL (Read Evaluate Print Loop) modus to experimentally learn Python commands.
Enter the following line to test the Python libraries installation
import PIL
Exit by pressing [Control+D].
-
Start Jupyter Lab by entering the following command in your Terminal or Git Bash
sh/jupyter.sh
NOTE You can also use the Jupyter plugin in VSCode.
-
-
Install Visual Studio Code
-
Enable VSCode to be opened from the command line (macOS only)
In VSCode, open the Command Palette and type 'shell command' in order to select the Shell command: Install ‘code’ command in PATH
-
Start vscode with command from current directory
Start a (git) bash shell and enter directory MakeAIWork, from there use the command code to start vscode.
cd MakeAIWork code .
-
Install the Python extension
-
Install Live Share
Follow the instructions at Collaborate with Live Share
-
Windows Subsystem for Linux (Windows only)
-
Check If Your Processor Supports Virtualization
-
Enable Windows Subsystem for Linux
Enter the following command in Windows Powershell:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
-
Enable the Virtual Machine Platform feature Enter the following command in Windows Powershell:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
-
Make WSL 2 Default Enter the following command in Windows Powershell:
wsl –set-default-version 2
-
-
Install Docker Desktop To facilitate you with a managed portable isolated Development Environment, we provide a Docker image in which all dependencies are preinstalled. We prefer Docker for isolation since it is a much lighter solution than Virtual Machine.
-
Download and install Docker Desktop
-
Configure Docker Desktop
Open Docker Desktop, go to settings and select Start when you login
In Windows you can a script to enable Docker Desktop to start directly after you start Git Bash:
sh/git_bash_profile.sh
this script will also navigate automatically to the MakeAIWork directory.
-
Test your Docker installation Check if you are able to use Docker by running an example container in (git) bash
docker run hello-world
For the Simulation Project you need an OpenGL environment.
-
Install XQuartz X.Org Window System On the MacOS host, we use xquartz to provide us with a MacOS X Window System.
Download and install xquartz
Log out and Log in to activate the changes the terminal -
Configure XQuartz to allow network connections from host
-
Get your IP address
Run the following command in the terminal to see your IP address
ifconfig en0 | grep 'inet ' | awk '{print $2}'
-
Start XQuartz
open -a XQuartz
which will open a XQuartz terminal in which you enter
xhost {Your IP}Click on the word 'XQuartz' on the top left of your screen (next to the Apple logo) and select Preference. Open the tab Security and check 'Allow connections from network clients'
-
-
Install Socat The graphical Python script runs with a Linux X Window System in a Docker container. To connect this to the MacOS X Window System on the host we use the command line utility socat.
brew install socat
-
Test by running a Python script with GUI
How to Use Linux Terminal in Windows 10
Jupyter
Running GUI's with Docker on OS X -