Python environment¶
When you connect to a terminal over SSH or EC2 Instance Connect,
the Python environment at /opt/ml/venv is already active, so python, pip
and jupyter all use it. In Session Manager, run sudo -iu ubuntu first.
What is installed¶
- Python 3.12
- scikit-learn, pandas, NumPy, SciPy and joblib
- matplotlib and seaborn, for charts
- openpyxl and xlrd, for Excel files
- JupyterLab
The exact version of every package in this environment is listed in
/opt/ml/requirements.lock.txt.
It is yours to change
Install, upgrade or remove packages with pip as you like. The Studio runs
from its own separate environment, so nothing you change here can break
it.
Use a model you downloaded¶
The .joblib file downloads to your own computer. To use it on the instance,
copy it back, either with scp:
or by uploading it through JupyterLab's file browser. Then follow Score a file in Python.
The Studio's service¶
The Studio runs as a system service named sushi-ml-studio, and starts by
itself when the instance boots.
sudo systemctl status sushi-ml-studio # is it running?
sudo systemctl restart sushi-ml-studio # restart it
sudo journalctl -u sushi-ml-studio -f # follow its log
The log also records failed sign-ins and passwords changed from the Studio, with the address they came from. Through a tunnel, the address shows as unknown.