Skip to content

Commit 5fb892d

Browse files
author
张仕洋
committed
fix
1 parent 5843b07 commit 5fb892d

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

docs/faq/remote-gdb.mdx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ docker run -it --gpus all --ipc=host --shm-size 1G --ulimit memlock=-1 --ulim
2727
### 3. Install openssh
2828

2929
```bash
30-
apt-get update
31-
apt-get install -y openssh-server openssh-client vim
30+
apt-get update -y
31+
apt-get install -y openssh-server openssh-client vim gdb
3232
```
3333

3434
### Modify system configuration
@@ -47,15 +47,14 @@ PermitRootLogin yes
4747
PubkeyAuthentication yes
4848
```
4949

50-
Start the service: `/etc/init.d/ssh start` or `/etc/init.d/ssh restart`
50+
Start the service:
51+
`/etc/init.d/ssh start`
52+
or
53+
`/etc/init.d/ssh restart`
5154

5255
After starting the service, you can perform connection verification: `ssh -p 22 [email protected]`. If the startup fails, it will report a "Connection refused" error. If successful, it will prompt you to enter a password and display a "Welcome" message.
5356

54-
### 5. Install debugging tools inside Docker
55-
56-
```bash
57-
apt-get install gdb
58-
```
57+
5958

6059
### 6. Compile torchpipe in debug mode
6160

@@ -138,15 +137,15 @@ pdb.set_trace()
138137
**Configuration File**
139138

140139
```json
141-
// Modify "program": "/opt/conda/bin/python" according to the result of "which python"
140+
// Modify "program": "/usr/bin/python" according to the result of "which python"
142141
{
143142
"version": "0.2.0",
144143
"configurations": [
145144
{
146145
"name": "(gdb) Attach",
147146
"type": "cppdbg",
148147
"request": "attach",
149-
"program": "/opt/conda/bin/python", /* My virtual env */
148+
"program": "/usr/bin/python", /* My virtual env */
150149
"processId": "${command:pickProcess}",
151150
"MIMode": "gdb",
152151
"setupCommands": [

i18n/zh/docusaurus-plugin-content-docs/current/contribution_guide/modify_the_code.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ type: reference
1414
为了保证服务端的稳定性,我们对c++有所要求:
1515
- 所有的代码需要是异常安全的
1616
- 不允许人为退出程序,而是以抛出异常代替
17+
- 锁资源,不锁操作
1718

1819
对于复杂的修改,请考虑进行测试:
1920

i18n/zh/docusaurus-plugin-content-docs/current/faq/remote-gdb.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ docker run -it --gpus all --ipc=host --shm-size 1G --ulimit memlock=-1 --ulimit
3333

3434
### 3. 安装openssh
3535
```bash
36-
apt-get update
37-
apt-get install -y openssh-server openssh-client vim
36+
apt-get update -y
37+
apt-get install -y openssh-server openssh-client vim gdb
3838
```
3939

4040
### 4. 修改系统配置
@@ -47,15 +47,15 @@ Port 22
4747
PermitRootLogin yes
4848
PubkeyAuthentication yes
4949
```
50-
启动服务: `/etc/init.d/ssh start` 或者 `/etc/init.d/ssh restart`
50+
启动服务:
51+
`/etc/init.d/ssh start`
52+
或者
53+
`/etc/init.d/ssh restart`
5154

5255
启动服务后可以进行连接验证:`ssh -p 22 [email protected]`,如果启动失败,会报Connection refused的错误,成功则会让你输入密码,并有Welcome字样提示。
5356

5457

55-
### 5. docker内安装调试工具
56-
```bash
57-
apt-get install gdb
58-
```
58+
5959

6060
### 6. 编译torchpipe为debug模式
6161

@@ -139,15 +139,15 @@ pdb.set_trace()
139139
**配置文件**
140140

141141
```json
142-
// 根据 ``which python`` 的结果修改 "program": "/opt/conda/bin/python"
142+
// 根据 ``which python`` 的结果修改 "program": "/usr/bin/python"
143143
{
144144
"version": "0.2.0",
145145
"configurations": [
146146
{
147147
"name": "(gdb) Attach",
148148
"type": "cppdbg",
149149
"request": "attach",
150-
"program": "/opt/conda/bin/python", /* My virtual env */
150+
"program": "/usr/bin/python", /* My virtual env */
151151
"processId": "${command:pickProcess}",
152152
"MIMode": "gdb",
153153
"setupCommands": [

0 commit comments

Comments
 (0)