Skip to content

Commit 93e6244

Browse files
committed
Add section about custom template
1 parent ca19aad commit 93e6244

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,3 +218,23 @@ urllib3==1.26.7
218218
xarray==2024.2.0
219219
xlrd==2.0.1
220220
```
221+
222+
### Custom template using Code Interpreter
223+
224+
The template requires custom setup. If you want to build your own custom template and use Code Interpreter, you need to do:
225+
1. Copy `jupyter_server_config.py` and `start-up.sh` from this PR
226+
2. Add following commands in your Dockerfile
227+
```Dockerfile
228+
# Installs jupyter server and kernel
229+
RUN pip install jupyter-server ipykernel ipython
230+
RUN ipython kernel install --name "python3" --user
231+
# Copes jupyter server config
232+
COPY ./jupyter_server_config.py /home/user/.jupyter/
233+
# Setups jupyter server
234+
COPY ./start-up.sh /home/user/.jupyter/
235+
RUN chmod +x /home/user/.jupyter/start-up.sh
236+
```
237+
3. Add the following option `-c "/home/user/.jupyter/start-up.sh"` to `e2b template build` command or add this line to your `e2b.toml`.
238+
```yaml
239+
start_cmd = "/home/user/.jupyter/start-up.sh"
240+
```

0 commit comments

Comments
 (0)