1 terminal
Terminal opening process: file browser (Ctrl + Shift + F) - new startup page (Ctrl + Shift + L) - terminal
- The terminal does not have sudo privileges;
- You can only open up to 5 terminals at the same time;
- Both python and pip environment variables have been configured;
- The address of the home directory is
/home/aistudio
.
2 Files (File Browser)
Open file browser process: File Browser (Ctrl + Shift + F)
- The file browser displays folders and files under
/home/aistudio
the path ; - Among them,
/home/aistudio/data
is the mounted dataset directory, not the persistent directory. Changes in this directory will be automatically restored after restarting the environment.
2.1 Upload files
Upload file process: file browser (Ctrl + Shift + F) - upload file
3 datasets
View Dataset Process: Dataset
- On the page, only copying the path of the dataset file is supported, but not modifying the dataset (if you need to modify the dataset, you need to modify it on the project details page);
- Datasets are stored at
/home/aistudio/data
the path .
4 environment
View Dataset Process: Environment Information
5 monitoring
View monitoring process: Monitoring
Among them, you can click "CPU usage" or "AI accelerator card usage" to view the monitoring over time.
6 Package Management
6.1 Persistent installation of third-party packages for Python
If you need to perform persistent installation, you need to use the persistent path installation, for example:
!mkdir /home/aistudio/external-libraries
!pip install paddlenlp -t /home/aistudio/external-libraries
At the same time, the following code needs to be run every time the environment starts:
import sys
sys.path.append('/home/aistudio/external-libraries')
6.2 Configure matplotlib to display Chinese
matplotlib
The default font used does not support displaying Chinese, which can be adjusted as follows:
import matplotlib
matplotlib.rcParams["font.sans-serif"] = ["FZSongYi-Z13S"] # 指定支持中文的默认字体
matplotlib.rcParams["axes.unicode_minus"] = False # 解决保存图像是负号'-'显示为方块的问题