Set Up Remote Server for Deep Learning
Install Pyenv
Update System Packages
(Optional): Install Dependencies
Install optional dependencies with
or
Install Pyenv
Set Up Environment Variables
Don’t forget to restart your shell for the changes to take effect.
Install Python & Set Up Virtual Environment with Pyenv
Check available versions
Install specific version
Set global version with
or just assign to current shell with
Install pyenv-virtualenv
Update shell configuration:
Restart your shell:
Create a new virtual environment:
Activate the virtual environment:
Install Packages with pip
install packages with pip using mirrors
For one time use, install packages with mirror address
For global set up, create file ~/.pip/pip.conf
with the following content.
Create folder ~/.pip/
if it does not exist.
Python Package Management with Poetry
install poetry and add to PATH
additional setup
I prefer to use virtual environment under the current project directory.
use poetry config --list
to check current settings.
create new project
install dependencies
Two files, pyproject.toml
and poetry.lock
, are created and updated accordingly by now. When you use poetry add
command, Poetry will automatically do the following three things in this order:
- update
pyproject.toml
- update
poetry.lock
according topyproject.toml
- update virtual environment according to
poetry.lock
read more
Git Clone Projects for Remote Development
clone private projects
Create GitHub Personal Access Token(PAT)
- In GitHub, go to
Settings
—>Developer Settings
—>Personal access tokens
. - Click
Generate new token
and assign the token a name. - Grant the token privilege to the repo group.
- Copy the token to a secure location. You won’t be able to view the token again.
- At the bottom of the page, click Generate Token.