Install Python and Setup a Virtual Environment -> Python 3.8.10
Upgrade pip:
python -m pip install --upgrade pip
This one is needed to isolate the requirements of a project from the entire Python installation and packages.
pip install virtualenv
virtualenv --version
Go to your project folder and create virtualenv:
python -m venv ./.venv
Before activating the venv, you need to give permission to PowerShell scripts. Run PowerShell as administrator and execute the following command.
set-executionpolicy remotesigned
Activate the venv and upgrade pip:
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
Deactivate the venv:
deactivate
The required packages for RL development is listed below:
pip install torch==1.10.1+cu113 torchvision==0.11.2+cu113 torchaudio===0.10.1+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
pip install gym
pip install stable-baselines3[extra]
pip install fmpy[complete]
pip install mysql-connector-python
- VSCode -> Download the setup file from official page. After VSCode installation, add Python extension from marketplace.
- Install Visual Studio Community edition. This one is needed for C/C++ libraries required by FMU simulations. -> Download
Install Git for Windows. After installation, there are some steps to go through in order to complete the setup.
git config --global user.name "serhat-akbas"
git config --global user.email [email protected]
git config --global core.editor "code --wait"
git config --global color.ui auto
git config --list
git config --list --global
You also need to configure SSH in order to communicate with GitHub (pull, push etc. commands directly from terminal). Open git bash and type the following:
ssh-keygen -t ed25519 -C "[email protected]"
ssh-add ~/.ssh/id_ed25519
clip < ~/.ssh/id_ed25519.pub
Go to GitHub (link) and click on "New SSH Key" in settings (SSH and GPG keys). Paste the copied key into the field. For more information, refer to GitHub docs on SSH.
Install WSL (Ubuntu). This is needed for Docker on Windows.
wsl --install
This command installs the latest WSL Linux kernel version onto your machine. Ubuntu is the default distribution of Linux. For the complete documentation, visit official page.
Install Docker Desktop on Windows. Official page.
Build and run the image:
docker build -t project-ai-docker-image -f ./Dockerfile .
Run the image:
docker run -it --rm --gpus all project-ai-docker-image bash