Skip to content

Commit 32031b7

Browse files
committed
feat(docs): i18n MVP — 翻译 5 篇代表性文档
覆盖不同场景的 MVP 样本,用于验证翻译 agent 的能力边界: - ai/reinforcement-learning-overview (zh→en) — AI 术语密集 - ai/compute-platforms-handbook (zh→en) — 代码块保留 - computer-science/01-singly-linked-list (en→zh) — 长文 + ASCII 图 - jobs/bq (zh→en) — 文化语境 / STAR / BQ 行话 - CommunityShare/Geek/cloudflare-r2-sharex (zh→en) — 表格 + 中文 URL 编码 每份翻译版: - 继承原文 docId(共享同一文档的版本) - frontmatter 有 translatedFrom/translatedAt 标记,contributors 脚本会跳过 - 代码块 / math / URL / MDX 属性名原样保留 - 仅翻译 title、description、正文文本与 MDX 文本内容 MVP 5 篇总 token ~29.4k,平均 5.9k/篇。
1 parent 93c1648 commit 32031b7

5 files changed

Lines changed: 1166 additions & 0 deletions

File tree

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
---
2+
title: Building a Personal/Team "Permanent" Image Host with Cloudflare R2 + ShareX
3+
description: ""
4+
date: "2025-09-27"
5+
tags:
6+
- tag-one
7+
docId: gj4bn01un0s0841berfvwrn5
8+
lang: en
9+
translatedFrom: zh
10+
translatedAt: 2026-04-15T00:00:00Z
11+
translatorAgent: claude-opus-4-6
12+
---
13+
14+
# Building a Personal/Team "Permanent" Image Host with Cloudflare R2 + ShareX
15+
16+
This guide walks you from zero to a working image host — high-performance, reliable, near-zero cost, and fully under your control — built on Cloudflare R2's free tier and ShareX's workflow automation.
17+
18+
**End result**: press a hotkey to take a screenshot, have the image automatically uploaded to your own storage (or upload existing local images manually), and get a Markdown-formatted link copied straight to your clipboard for seamless writing.
19+
20+
---
21+
22+
## Contents
23+
24+
1. [Part 1: Configure Cloudflare R2 (cloud storage)](#part-1-configure-cloudflare-r2-cloud-storage)
25+
2. [Part 2: Configure ShareX (desktop client)](#part-2-configure-sharex-desktop-client)
26+
3. [Part 3: Optimize the ShareX workflow](#part-3-optimize-the-sharex-workflow)
27+
4. [F.A.Q. and troubleshooting](#faq-and-troubleshooting)
28+
29+
---
30+
31+
## Part 1: Configure Cloudflare R2 (cloud storage)
32+
33+
First, enable R2 storage in Cloudflare.
34+
![](https://pub-85d4dcece16844bf8290aa4b33608ccd.r2.dev/ShareX/2025/09/%E5%9B%BE%E7%89%87_20250927143514.png)
35+
36+
### 1.1 Create an R2 bucket
37+
38+
A bucket is the container that holds all your images.
39+
40+
1. Sign in to the Cloudflare dashboard and open **R2** from the left-hand menu.
41+
2. Click **Create bucket**.
42+
3. **Bucket name**: enter a globally unique bucket name (for example, `your-org-images-2025`).
43+
4. **Location**: leave the default **Automatic**.
44+
5. Click **Create bucket**.
45+
46+
![](https://pub-85d4dcece16844bf8290aa4b33608ccd.r2.dev/ShareX/2025/09/xrRAVMB2Sz.png)
47+
48+
### 1.2 Enable public access on the bucket
49+
50+
To let uploaded images be served externally, turn on public access.
51+
52+
1. Open the bucket you just created and click the **Settings** tab at the top.
53+
![1r0AU3aWkD.png](https://pub-85d4dcece16844bf8290aa4b33608ccd.r2.dev/ShareX/2025/09/1r0AU3aWkD.png)
54+
2. In the **Public Development URL** section below, click **Enable** on the right.
55+
3. Type the confirmation text.
56+
![fgc4amk7S7.png](https://pub-85d4dcece16844bf8290aa4b33608ccd.r2.dev/ShareX/2025/09/fgc4amk7S7.png)
57+
4. **Note down** the `https://pub-....r2.dev` URL shown here — this is your public-access domain.
58+
![RmQwxSxpLi.png](https://pub-85d4dcece16844bf8290aa4b33608ccd.r2.dev/ShareX/2025/09/RmQwxSxpLi.png)
59+
60+
### 1.3 Create an API token for uploads
61+
62+
The API token is the "key" that lets ShareX upload files to R2.
63+
64+
1. Return to the R2 overview page and click **Manage API Tokens** in the top-right corner.
65+
![CTzhiiSl04.png](https://pub-85d4dcece16844bf8290aa4b33608ccd.r2.dev/ShareX/2025/09/CTzhiiSl04.png)
66+
1. Click **Create Account API token**.
67+
![FBEzXXohz7.png](https://pub-85d4dcece16844bf8290aa4b33608ccd.r2.dev/ShareX/2025/09/FBEzXXohz7.png)
68+
1. **Permissions**: **you must select `Object Read & Write`**. This is the critical step — read-only permissions will cause uploads to fail.
69+
![xB4pYQOeEI.png](https://pub-85d4dcece16844bf8290aa4b33608ccd.r2.dev/ShareX/2025/09/xB4pYQOeEI.png)
70+
1. Click **Create API token**.
71+
1. **⚠️ Copy and save immediately!** The page displays your `Access Key ID` and `Secret Access Key`. **These two secrets are shown only once** — copy them immediately and paste them somewhere safe. The `Default endpoints` link at the bottom also needs to be saved.
72+
![kg9E8tEozI.png](https://pub-85d4dcece16844bf8290aa4b33608ccd.r2.dev/ShareX/2025/09/kg9E8tEozI.png)
73+
74+
---
75+
76+
## Part 2: Configure ShareX (desktop client)
77+
78+
### 2.1 Download and install ShareX
79+
80+
Grab the latest version from the official site: [https://getsharex.com/](https://getsharex.com/)
81+
82+
### 2.2 Configure the S3 upload destination
83+
84+
This is the heart of the setup.
85+
86+
1. Open ShareX and, from the main window, click `Destination settings...`.
87+
2. In the popup, select `Amazon S3` on the left and fill in your configuration on the right.
88+
3. Fill in your R2 details exactly as shown in the table below:
89+
90+
| ShareX field | What to enter | Notes |
91+
| --------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
92+
| **Access key ID** | Paste the `Access Key ID` you saved | |
93+
| **Secret access key** | Paste the `Secret Access Key` you saved | |
94+
| **Region** | Leave blank | |
95+
| **Endpoints** | Leave blank |
96+
| **Endpoint** | `https://<your-AccountID>.r2.cloudflarestorage.com` | If you saved this earlier, paste it as-is. Make sure there's no trailing `/`. |
97+
| **Bucket name** | Your R2 bucket name (for example, `your-org-images-2025`) | |
98+
| **Upload path** | `img/%y/%mo/%d/` | Organizes images as `img/year/month/day/`, which helps with management. ShareX uses `%` for variables. (Customize as you like.) |
99+
| **Use custom domain** | **Check this box** | |
100+
| (Custom domain field) | `https://<the r2.dev public URL you noted down>` | **Note**: only paste the Public Development URL you saved earlier — don't append `$key$`. Modern ShareX handles that automatically. |
101+
102+
#### 2.2.1 Critical Advanced settings
103+
104+
At the bottom of the S3 configuration window, find the **Advanced** section and apply these settings:
105+
106+
- `Set public-read ACL on file`: **must be unchecked**. R2 doesn't support this; leaving it checked will produce `403 Forbidden` errors.
107+
- `Use path style request`: **must be checked**. R2 requires this request URL style.
108+
109+
### 2.3 Set S3 as the default image uploader
110+
111+
1. Return to the ShareX main window.
112+
2. Click `Destinations` -> `Image uploader` -> `File uploader` -> and pick `Amazon S3`.
113+
![Code_nqStY1UhqR.png](https://pub-85d4dcece16844bf8290aa4b33608ccd.r2.dev/ShareX/2025/09/Code_nqStY1UhqR.png)
114+
115+
---
116+
117+
## Part 3: Optimize the ShareX workflow
118+
119+
### 3.1 Auto-copy a Markdown link
120+
121+
1. In the ShareX main window, click `Task settings...`.
122+
2. In the popup, select **`Advanced`** from the lower part of the left sidebar.
123+
![ShareX_ZWFVlZZu0W.png](https://pub-85d4dcece16844bf8290aa4b33608ccd.r2.dev/ShareX/2025/09/ShareX_ZWFVlZZu0W.png)
124+
3. Click `ClipboardContentFormat` under `After upload`.
125+
4. Replace the contents with the Markdown format `![$filename]($result)`.
126+
127+
### 3.2 Enable auto-copy to clipboard
128+
129+
1. From the main window, under `After upload tasks`, tick `Copy URL to clipboard` on the right.
130+
![ShareX_zf6qftjnu6.png](https://pub-85d4dcece16844bf8290aa4b33608ccd.r2.dev/ShareX/2025/09/ShareX_zf6qftjnu6.png)
131+
132+
### 3.3 Change the hotkey
133+
134+
You can change the hotkey under `Hotkey settings` on the main window, giving you a one-shot flow: screenshot → upload → Markdown on your clipboard.
135+
136+
---
137+
138+
## F.A.Q. and Troubleshooting
139+
140+
**Q1: I get a `(403) Forbidden` error when uploading — what now?**
141+
**A1:** This is the most common issue. Check the following two S3 Advanced settings:
142+
143+
1. Make sure **`Set public-read ACL on file`** is **unchecked**.
144+
2. Make sure **`Use path style request`** is **checked**.
145+
3. If it still fails, regenerate an **API token with `Object Read & Write` permissions** and update it in ShareX.
146+
147+
**Q2: I don't want to upload screenshots — I want to upload existing local images.**
148+
**A2:**
149+
**Use the Upload tab on the left**: pick the type of content you want to upload from inside that tab.
150+
![ShareX_34TAgHco1T.png](https://pub-85d4dcece16844bf8290aa4b33608ccd.r2.dev/ShareX/2025/09/ShareX_34TAgHco1T.png)
151+
152+
**Q3: Why can't I use PicGo?**
153+
**A3:** In my testing, PicGo's S3 plugin has compatibility issues with Cloudflare R2 — filenames and paths aren't handled correctly. ShareX's S3 implementation is more standard and currently the more reliable choice.
Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
---
2+
title: Compute Platforms
3+
description: A guide to AI development on cloud compute platforms such as AutoDL and InternStudio
4+
date: "2025-01-27"
5+
tags:
6+
- compute-platforms
7+
- autodl
8+
- internstudio
9+
- gpu-cloud
10+
- development-environment
11+
docId: d73h3kyjnzytk1y2nizulyr6
12+
lang: en
13+
translatedFrom: zh
14+
translatedAt: 2026-04-15T00:00:00Z
15+
translatorAgent: claude-opus-4-6
16+
---
17+
18+
Training and inference on AI models requires substantial compute. This section walks through the mainstream compute platforms and cloud services to help developers pick the right resources.
19+
20+
## AutoDL
21+
22+
### Overview
23+
24+
- **Website**: [https://www.autodl.com/home](https://www.autodl.com/home)
25+
- **Positioning**: A dedicated GPU cloud service
26+
- **Strengths**: Affordable pricing and a simple workflow — well suited for individual developers and small teams
27+
28+
### Documentation
29+
30+
- **Full docs**: [AutoDL official docs](https://www.autodl.com/docs/)
31+
- **Coverage**:
32+
- Instance creation and management
33+
- Environment setup
34+
- Data upload and download
35+
- Billing and cost
36+
37+
### Step-by-Step: Connecting PyCharm Professional to AutoDL
38+
39+
**Configuration steps**:
40+
41+
1. **Create an AutoDL instance**: Pick a suitable GPU configuration
42+
2. **Collect connection info**: Note the IP address, port, and username
43+
3. **Configure PyCharm**: Set up the remote interpreter
44+
4. **File sync**: Configure automatic upload and download
45+
5. **Debug and run**: Remote debugging and code execution
46+
47+
**Network configuration**:
48+
49+
- SSH connection settings
50+
- Port forwarding
51+
- File transfer tuning
52+
- Ensuring a stable connection
53+
54+
**Development workflow**:
55+
56+
- Write code locally
57+
- Sync code to the remote machine
58+
- Schedule GPU resources
59+
- Download result files
60+
61+
## InternStudio
62+
63+
### Platform Introduction
64+
65+
- **Website**: [https://studio.intern-ai.org.cn/](https://studio.intern-ai.org.cn/user/account)
66+
- **Highlights**: A free compute platform provided by the Shanghai AI Laboratory
67+
- **Use cases**: Learning, research, and small-scale project development
68+
69+
### Connection and Usage
70+
71+
**SSH connection setup**:
72+
73+
- [SSH connection and port forwarding tutorial](https://juejin.cn/post/7446234916049829939)
74+
- Supports remote development workflows
75+
- Provides a JupyterLab interface
76+
77+
**Camp 4 training resources**:
78+
79+
- **GitHub**: [Tutorial (Camp 4)](https://github.com/InternLM/Tutorial/tree/camp4)
80+
- **Linux basics**: [InternStudio basic commands](https://aicarrier.feishu.cn/wiki/XZChwwDsciyFyHk5mGTc1EKinkc)
81+
82+
### Open-Source Community Project Applications
83+
84+
**Compute grants**:
85+
86+
- 🔥 [Intern LLM open-source community project application](https://openxlab.org.cn/apps) 🔥
87+
- Available for open-source projects and academic research
88+
- Offers long-term, stable compute support
89+
90+
## Platform Comparison
91+
92+
### When to Choose AutoDL
93+
94+
**Strengths**:
95+
96+
- Hourly billing keeps costs predictable
97+
- Rich set of preinstalled environments
98+
- Good Chinese-language support
99+
- Stable network connectivity
100+
101+
**Ideal users**:
102+
103+
- Individual developers
104+
- Beginners and students
105+
- Short-term project needs
106+
- Budget-constrained teams
107+
108+
### When to Choose InternStudio
109+
110+
**Strengths**:
111+
112+
- Free usage quota
113+
- Academic-friendly
114+
- Integrated with the InternLM ecosystem
115+
- Rich educational resources
116+
117+
**Ideal users**:
118+
119+
- Students and researchers
120+
- InternLM model users
121+
- Teaching and training
122+
- Open-source project development
123+
124+
### Other Cloud Options
125+
126+
#### International Platforms
127+
128+
- **Google Colab**: Free GPU — good for learning and lightweight work
129+
- **AWS EC2**: Enterprise-grade service with broad features but higher cost
130+
- **Microsoft Azure**: Integrates well with the Windows ecosystem
131+
- **Lambda Labs**: Specialized GPU cloud provider
132+
133+
#### China-Based Platforms
134+
135+
- **Alibaba Cloud**: Enterprise-grade with a mature ecosystem
136+
- **Tencent Cloud**: Tuned for gaming and social workloads
137+
- **Baidu Cloud**: AI platform built around the PaddlePaddle ecosystem
138+
- **Huawei Cloud**: Support for Ascend AI processors
139+
140+
## Tips and Best Practices
141+
142+
### Cost Optimization
143+
144+
1. **On-demand usage**: Shut down idle instances promptly
145+
2. **Preinstalled images**: Pick an image that matches your stack
146+
3. **Data management**: Plan storage usage up front
147+
4. **Alerts**: Set budget and resource-usage alerts
148+
149+
### Developer Productivity
150+
151+
1. **Environment management**: Use Docker or conda
152+
2. **Code sync**: Set up Git or a file-sync tool
153+
3. **Debugging**: Master remote debugging workflows
154+
4. **Resource monitoring**: Watch GPU and memory usage in real time
155+
156+
### Data Security
157+
158+
1. **Regular backups**: Back up critical data across multiple locations
159+
2. **Version control**: Manage code with Git
160+
3. **Access control**: Use strong SSH keys
161+
4. **Compliance**: Follow relevant data-handling regulations
162+
163+
## Environment Setup Guide
164+
165+
### Deep Learning Environment
166+
167+
**Core components**:
168+
169+
- CUDA/cuDNN
170+
- Python 3.8+
171+
- PyTorch/TensorFlow
172+
- Jupyter Notebook
173+
174+
**Common libraries**:
175+
176+
```bash
177+
# PyTorch ecosystem
178+
pip install torch torchvision transformers datasets
179+
180+
# Scientific computing
181+
pip install numpy pandas matplotlib seaborn
182+
183+
# Machine learning
184+
pip install scikit-learn xgboost lightgbm
185+
186+
# Deep learning utilities
187+
pip install wandb tensorboard
188+
```
189+
190+
### Development Tool Setup
191+
192+
- **IDEs**: PyCharm Professional, VS Code
193+
- **Debugging**: pdb, ipdb
194+
- **Profiling**: nvidia-smi, htop
195+
- **Version control**: Git, DVC
196+
197+
## Troubleshooting
198+
199+
### Common Issues
200+
201+
1. **Connection timeouts**: Check network and firewall settings
202+
2. **GPU unavailable**: Verify CUDA installation and driver version
203+
3. **Out of memory**: Reduce batch size or shrink model parameters
204+
4. **Out of disk space**: Clean up temporary files and logs
205+
206+
### Performance Tuning
207+
208+
1. **GPU utilization**: Monitor and optimize GPU usage
209+
2. **I/O optimization**: Speed up data loading and preprocessing
210+
3. **Memory management**: Tune caching and batch size appropriately
211+
4. **Parallelism**: Leverage multi-GPU and distributed training
212+
213+
## Learning Suggestions
214+
215+
1. **Know one platform deeply**: Develop expertise on at least one major platform
216+
2. **Stay cost-aware**: Learn to plan and control compute spend
217+
3. **Environment management**: Master configuration and dependency management
218+
4. **Monitor and tune**: Track resource usage and optimize performance
219+
5. **Security practices**: Take data security and access control seriously

0 commit comments

Comments
 (0)