Skip to content

MitwRdam/MakeAIWork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

448 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MakeAIWork

Python AI Workspace Installation


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

Git

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.

  1. Create an account at Github

  2. Install Git

    Make sure you select "Checkout as-is, commit Unix-style line endings" during the installation process.

  3. Install Homebrew (MacOS only)

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  4. Install iterm2 (MacOS)

    brew install iterm2
  5. 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)"
  6. 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.

  7. 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}
  8. 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.pub

    and paste this in the text area when adding a new ssh key in GitHub

  9. 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
  10. 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.git

    otherwise 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
  11. 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.

  12. 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 commands

    git remote add mitwrdam https://github.com/MitwRdam/MakeAIWork
  13. 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

Python

  1. Install python

  2. Install Miniconda (MacOS and Linux)

    Download and install Miniconda

  3. Create virtual Python environment

    install/create_virtual_env.sh
  4. Install Python libraries

    install/install_requirements.sh
  5. 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.

Visual Studio Code

  1. Install Visual Studio Code

  2. 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

  3. 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 .
  4. Install the Python extension

  5. Install Live Share

    Follow the instructions at Collaborate with Live Share

Docker (Periode 2)

  1. Windows Subsystem for Linux (Windows only)

    1. Check If Your Processor Supports Virtualization

    2. Enable Windows Subsystem for Linux

      Enter the following command in Windows Powershell:

      dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
    3. Enable the Virtual Machine Platform feature Enter the following command in Windows Powershell:

      dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
    4. Make WSL 2 Default Enter the following command in Windows Powershell:

      wsl –set-default-version 2
  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.

    1. Download and install Docker Desktop

      Download for Mac with Apple M* chip

    2. 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.

    3. Test your Docker installation Check if you are able to use Docker by running an example container in (git) bash

      docker run hello-world

    OpenGL (Periode 2)

    For the Simulation Project you need an OpenGL environment.

    1. 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

    2. Configure XQuartz to allow network connections from host

      1. Get your IP address

        Run the following command in the terminal to see your IP address

        ifconfig en0 | grep 'inet ' | awk '{print $2}'
      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'

    3. 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
    4. Test by running a Python script with GUI

    Project


    References

    How to Use Linux Terminal in Windows 10
    Jupyter
    Running GUI's with Docker on OS X

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •