Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3d9b02a

Browse files
modify readme
1 parent 6db47b1 commit 3d9b02a

File tree

4 files changed

+52
-56
lines changed

4 files changed

+52
-56
lines changed

‎README.md‎

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Supports the opening of more ports to achieve more custom functionality requirem
2424
## 💡 What Can You Do?
2525
1. Execute Python code.
2626
2. Supports reading of uploaded files ([Upload and Analyze Files](./examples/client/codeinterpreter_session.py)).
27-
```
27+
```python
2828
if name=='main':
2929
session=CodeinterpreterSession()
3030
try:
@@ -59,7 +59,7 @@ session.close()
5959
## 💻 Sample Codes
6060
1. **Server-Client Interaction**: [jupyter server communicate](./examples/jupyter/jupyter_api_test.ipynb) showcases the details of interaction between the server and the Jupyter container.
6161
2. **Remote Execution**: [jupyter call](./examples/jupyter/execute_dynamic_code.ipynb) demonstrates how to invoke a web service via an HTTP request, execute code, and retrieve results.
62-
```
62+
```python
6363
test_code="""
6464
import docker
6565
print(docker.version)
@@ -71,7 +71,7 @@ execute(test_code)
7171
Execute Result= {"output_type":"text/plain","content":"6.1.3\n","files":null}
7272
```
7373
3. **Client Session Demonstration**: [client session invocation](./examples/client/codeinterpreter_session.py) shows how to allow LLM to invoke and execute code in a project through session and HTTP request.
74-
```
74+
```python
7575
session=CodeinterpreterSession()
7676
try:
7777
session.upload_files(['./../data/test_data.csv'])
@@ -81,7 +81,28 @@ session.close()
8181
```
8282

8383
## 📦 Deployment
84+
1. **Install Docker**
85+
Linux: Install Docker by terminal
86+
Mac os: Install Docker desktop for mac
87+
Windows: Install Docker desktop for windows
88+
2. **Modify Docker config file**
8489
Head over to [docker compose](./app/docker_dev.yml) and substitute 'CODEBOX_ROOT_PATH' and 'YOUR_MNT_PATH:/codebox' with your file path to mount 'YOUR_MNT_PATH'.
90+
3. **Launch server**
91+
- Build custom jupyter image
92+
```shell
93+
cd docker
94+
docker build -t scipy-notebook:custom -f Dockerfile .
95+
```
96+
- Build web server image
97+
```shell
98+
cd app
99+
docker-compose -f docker_dev.yml build
100+
```
101+
- Launch server
102+
```shell
103+
docker-compose -f docker_dev.yml up
104+
```
105+
85106

86107
## 📧 Contact
87108
WeChat: zjajzzj1996

‎README_ZH.md‎

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
## 功能描述
1818
1. 执行python代码
1919
2. 支持上传文件的读取([上传文件并分析](./examples/client/codeinterpreter_session.py))
20-
```
20+
```python
2121
if __name__=='__main__':
2222
session=CodeinterpreterSession()
2323
try:
@@ -54,7 +54,7 @@ if __name__=='__main__':
5454

5555
1. [jupyter server communicate](./examples/jupyter/jupyter_api_test.ipynb) 中展示了server和jupyter container交互的细节
5656
2. [jupyter 调用](./examples/jupyter/execute_dynamic_code.ipynb)中展示了如何通过http request的方式调用web服务,执行代码获取结果
57-
```
57+
```python
5858
test_code="""
5959
import docker
6060
print(docker.__version__)
@@ -67,7 +67,7 @@ execute(test_code)
6767
Execute Result= {"output_type":"text/plain","content":"6.1.3\n","files":null}
6868
```
6969
3. [client session调用](./examples/client/codeinterpreter_session.py)中展示了在项目中如何以session和http request的方式让LLM调用执行代码。
70-
```
70+
```python
7171
session=CodeinterpreterSession()
7272
try:
7373
session.upload_files(['./../data/test_data.csv'])
@@ -77,8 +77,27 @@ finally:
7777
```
7878

7979
## 部署
80-
[docker compose](./app/docker_dev.yml)中使用自己的文件路径替代'CODEBOX_ROOT_PATH'和 'YOUR_MNT_PATH:/codebox' 中的'YOUR_MNT_PATH'来挂载自己的文件路径
81-
80+
1. **Install Docker**
81+
Linux: Install Docker by terminal
82+
Mac os: Install Docker desktop for mac
83+
Windows: Install Docker desktop for windows
84+
2. **Modify Docker config file**
85+
Head over to [docker compose](./app/docker_dev.yml) and substitute 'CODEBOX_ROOT_PATH' and 'YOUR_MNT_PATH:/codebox' with your file path to mount 'YOUR_MNT_PATH'.
86+
3. **Launch server**
87+
- Build custom jupyter image
88+
```shell
89+
cd docker
90+
docker build -t scipy-notebook:custom -f Dockerfile .
91+
```
92+
- Build web server image
93+
```shell
94+
cd app
95+
docker-compose -f docker_dev.yml build
96+
```
97+
- Launch server
98+
```shell
99+
docker-compose -f docker_dev.yml up
100+
```
82101

83102
## 联系方式
84103
微信:zjajzzj1996

‎docker/mycert.pem‎

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,2 @@
1-
-----BEGIN CERTIFICATE-----
2-
MIIDUjCCAjoCCQDkox2h4Oy2azANBgkqhkiG9w0BAQsFADBrMQswCQYDVQQGEwJj
3-
bjERMA8GA1UECAwIemhlamlhbmcxDTALBgNVBAcMBGFuamkxEzARBgNVBAoMCkFh
4-
YVMud29ybGQxJTAjBgkqhkiG9w0BCQEWFnpoYW5nemhlaGlhbkBnbWFpbC5jb20w
5-
HhcNMjMwOTE4MTUwMzMzWhcNMjQwOTE3MTUwMzMzWjBrMQswCQYDVQQGEwJjbjER
6-
MA8GA1UECAwIemhlamlhbmcxDTALBgNVBAcMBGFuamkxEzARBgNVBAoMCkFhYVMu
7-
d29ybGQxJTAjBgkqhkiG9w0BCQEWFnpoYW5nemhlaGlhbkBnbWFpbC5jb20wggEi
8-
MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC5Q1PrrSKJ+TQ/pcgrdK0wLmZY
9-
I9Qy9pKIJDPcPLwYay9AeW4rl1bfRi/epHlbhWrD1A1CZi9uwqsWOh20hr+mU0UK
10-
ZNJMV3bfqRHigWbllZ2opNZyWTcOIn7cVmkrN36EmpzoBoPeVqNFHS/0cpZjEzrY
11-
GVmeqcyU5+2fywINLR4EQ/r/6m82tOi51ZGlc38TcEYL7Ed7W9YI6S1HpUeGKOKa
12-
+FJ2+nx/3AMPFTy28RmzFNCtji1FEUH2a2wgq3ipLA9PM0hUw9qET41GuSsiUfxC
13-
hLqzcF2nZJGU+FKkL3/gq4+RuyRWh2z7dImgYkvOcLv7XyOpDtNcSutDRCibAgMB
14-
AAEwDQYJKoZIhvcNAQELBQADggEBAJ4ouhmgi6jjCR3mjAosYwekG/94kS586c4b
15-
RZWzQGJFKajYF1FGVcY6YOAFIDse403IOrNESrosmoojhGbLITk6yKvqnuZlzrM8
16-
DUGeVANm1oyNTSdA5wdyEiFoRxR0249e9sf/DgAk6SyPOy/ImQsZEeXnd9R+rZQ/
17-
gEGRmsMexv7v3XFxwG10kXKiqiJTzoHWeL9brbH+AFZ2/lFfMc8sgCqv8HGcTaUv
18-
2AdHMc8wGX+2vIQuw5pv78ivD+iX85FyIpS9AmG5LGKYbTfqqErY016Fv0u0kLic
19-
QVBMWhaTGfaHEFwiq5uo8cbTwjQ5ZzuGa3juNkFersT9Bh//xW8=
20-
-----END CERTIFICATE-----
1+
TO_ENABLE_HTTPS/WSS
2+
YOU_KEY_HERE

‎docker/mykey.key‎

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,2 @@
1-
-----BEGIN PRIVATE KEY-----
2-
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC5Q1PrrSKJ+TQ/
3-
pcgrdK0wLmZYI9Qy9pKIJDPcPLwYay9AeW4rl1bfRi/epHlbhWrD1A1CZi9uwqsW
4-
Oh20hr+mU0UKZNJMV3bfqRHigWbllZ2opNZyWTcOIn7cVmkrN36EmpzoBoPeVqNF
5-
HS/0cpZjEzrYGVmeqcyU5+2fywINLR4EQ/r/6m82tOi51ZGlc38TcEYL7Ed7W9YI
6-
6S1HpUeGKOKa+FJ2+nx/3AMPFTy28RmzFNCtji1FEUH2a2wgq3ipLA9PM0hUw9qE
7-
T41GuSsiUfxChLqzcF2nZJGU+FKkL3/gq4+RuyRWh2z7dImgYkvOcLv7XyOpDtNc
8-
SutDRCibAgMBAAECggEAaXbGg1egX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-
0nzEIU49G0yr+TcpRMeJdpXJFnxPCPS4z05ZrZ8T+QKBgQCe1u1uLTR2au7k3BpD
25-
pPjUVQo6/0S8WKc9UIlHE4tWx226kYrRzjMkINvzhMj4cuNl+nzx5JH04/3RAONC
26-
3Qh77CNrN0tdTL82CRqSXREIyBloK2PpIICODhSUp9QbfGOhwb11KBzpxVh7Y5SI
27-
gQN5UwNFFFdKfYWOrQ3Uf2EvNg==
28-
-----END PRIVATE KEY-----
1+
TO_ENABLE_HTTPS/WSS
2+
YOU_KEY_HERE

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /