quarto
https://www.modelscope.cn/
/mnt/workspace/ is persistent storage (files survive across sessions).~/.bashrc) are reset on every restart./mnt/workspace/.Download the Script:
Run the Script:
/mnt/workspace/opt/quarto-1.9.37/.Expected Output:
Quarto 环境已设置 (版本: 1.9.37)
运行 'quarto --help' 查看帮助After System Restart: You don’t need to reinstall. Just re-activate:
Verify Installation:
Create hello.qmd with YAML header, text, and Python code.
Render it in the terminal:
This generates hello.html (or .docx if specified).
| Command | Description |
|---|---|
quarto render file.qmd |
Render to default format |
quarto render file.qmd --to docx |
Render to Word |
quarto preview file.qmd |
Live preview with auto-refresh |
quarto check |
Verify installation & engines |
source /mnt/workspace/quarto_setup.sh./mnt/workspace/downloads/, then re-run script.Click the Extensions icon in the Cloud Studio application, which is the icon resembling a window with four squares.
Enter quarto in the search area, and you will see an extension with an icon like this:
. Click to install it.
Create a new .ipynb file and name it using the format StudentID-Name-Chapter.ipynb, for example, “2016900020-peter-chapter1-test.ipynb”.
Open the created file, select add a code cell, and set the type of this first cell to raw.
Enter the following content into the cell:
---
title: 'chapter 1 introduction'
subtitle: 'applied statistics 2026'
author: '2016900020-peter'
date: last-modified
date-format: 'YYYY-MM-DD HH:mm:mm'
format: docx
---
Modify the content following the colons for title and author according to your actual information; do not modify any other content. Note: There must be a space after the colon.
Add another code cell, set the type of this cell to python, and enter print('hello world!') in the cell.
Enter the following command in the terminal: quarto render 2016900020-peter-chapter1-test.ipynb. If a .docx document is generated in the file explorer area, then the platform setup is successful.
By prepending the string https://assets.qiufei.site/data/ to the filename of the data referenced in the textbook, you can obtain the download link for the data.
For example, to obtain the data stock/stock_basic_data.h5, its URL would be: https://assets.qiufei.site/data/stock/stock_basic_data.h5
Enter the command wget -c https://assets.qiufei.site/data/stock/stock_basic_data.h5 in the terminal to download the data to the workspace.
The download command for all data in the textbook requires simply entering wget -c before the URL.
Change the original data_path = '/home/ubuntu/r2_data_mount/qiufei/data/stock'
Modify it to data_path = '/mnt/workspace'
for example:
# Automatically set local data paths based on the operating system
if platform.system() == 'Windows':
# Check the current operating system type
data_path = 'C:/qiufei/data/stock'
# Data path for Windows
else:
# Use server data path on Linux
data_path = '/mnt/workspace' # the original path is '/home/ubuntu/r2_data_mount/qiufei/data/stock'
# Data path for Linuxin order to us h5 data,you should install python’s pytables packages
the install command is pip install tables。
