Install Remote - WSL
extension (so you can connect to WSL in windows)
Install Python
extension (so you can select interpreter)
# install pyenv
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
Add following to ~/.bashrc
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
Add following to ~/.zshrc
export PYENV_VIRTUALENV_DISABLE_PROMPT=1
Install python:
# for ubuntu, following are required to install
sudo apt-get install -y zlib1g-dev openssl libssl-dev libbz2-dev libreadline-dev libsqlite3-dev libffi-dev build-essential
pyenv install 3.8.5
# make default python to 3.8.5 and pip to pip3
pyenv global 3.8.5
# virtualenv
sudo apt install python3-venv
pyenv virtualenv lation
# activate venv
pyenv activate lation
# delete venv
# pyenv virtualenv-delete lation
# install required modules
pip3 install -r lation/requirements.txt
# pip freeze | xargs pip uninstall -y
docker-compose -f ./deploy/stock/docker-compose.local.yml up
docker-compose -f ./deploy/coin/docker-compose.local.yml up
docker-compose -f ./deploy/spot_perp_bot/docker-compose.local.yml up
chmod 400 ./secrets/instance-keys/oracle-cloud
sudo ssh -o StrictHostKeyChecking=no -i ./secrets/instance-keys/oracle-cloud ubuntu@instance-1.lation.app
sudo ssh -o StrictHostKeyChecking=no -i ./secrets/instance-keys/oracle-cloud ubuntu@instance-2.lation.app
sudo ssh -o StrictHostKeyChecking=no -i ./secrets/instance-keys/oracle-cloud ubuntu@instance-3.lation.app
sudo ssh -o StrictHostKeyChecking=no -i ./secrets/instance-keys/oracle-cloud ubuntu@instance-4.lation.app
sudo ssh -o StrictHostKeyChecking=no -i ./secrets/instance-keys/oracle-cloud ubuntu@instance-5.lation.app
sudo ssh -o StrictHostKeyChecking=no -i ./secrets/instance-keys/oracle-cloud ubuntu@instance-6.lation.app
$ winpty docker exec -it <container_id> bash # for windows
$ sudo docker exec spot_perp_bot_web_server_for_myself_1 bash -c 'cat "logs/$(ls logs | tail -n 1)"'
$ sudo docker exec spot_perp_bot_web_server_for_family_members_1 bash -c 'cat "logs/$(ls logs | tail -n 1)"'
root@<container_id>:/app# cat deploy/logs/access.log
root@<container_id>:/app# cat deploy/logs/error.log
root@<container_id>:/app# cat "logs/$(ls logs | tail -n 1)"