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

run_code as a user instead of root #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
mishushakov wants to merge 17 commits into main
base: main
Choose a base branch
Loading
from permissions-calling-run_code-as-a-different-user-e2b-2123
Draft
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
8ad22ef
wip
mishushakov Apr 26, 2025
14e0c51
fix file paths
mishushakov Apr 26, 2025
9d73789
fixes start command, adds logging, removes useradd in prod Docker
mishushakov Apr 28, 2025
e6edde7
undo some changes to e2b.toml, bring back r kernel
mishushakov Apr 28, 2025
4aeaeef
wip
mishushakov Apr 29, 2025
741e0e5
wip
mishushakov Apr 29, 2025
822beda
qip
mishushakov Apr 29, 2025
162c3de
sync'd some changes from test.Dockerfile to Dockerfile
mishushakov Apr 29, 2025
f1c427d
changed deno kernel path
mishushakov Apr 29, 2025
38ee9c7
change user in new context
mishushakov May 1, 2025
f16e512
Merge branch 'main' into permissions-calling-run_code-as-a-different-...
mishushakov May 14, 2025
23f58ea
start default kernel as root to avoid breaking change
mishushakov May 14, 2025
4a8c98a
adds ability to pass user to the createCodeContext SDK method
mishushakov May 14, 2025
44c2a42
added changeset
mishushakov May 14, 2025
d49ea96
changed default user to "user" as per @jakubno
mishushakov May 14, 2025
f4fc072
change default cwd depending on the user if cwd is not provided
mishushakov May 14, 2025
feb767e
changed template to code-interpreter-v1beta1
mishushakov May 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
changed template to code-interpreter-v1beta1
  • Loading branch information
mishushakov committed May 14, 2025
commit feb767eaf7094d08ae609db31eae5e4a2cb58555
15 changes: 8 additions & 7 deletions template/e2b.toml
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# This is a config for E2B sandbox template.
# You can use template ID (nlhz8vlwyupq845jsdg9) or template name (code-interpreter-v1) to create a sandbox:
# You can use template ID (n1vc02i7rx9xg0lao9nx) or template name (code-interpreter-v1beta1) to create a sandbox:

# Python SDK
# from e2b import Sandbox, AsyncSandbox
# sandbox = Sandbox("code-interpreter-v1") # Sync sandbox
# sandbox = await AsyncSandbox.create("code-interpreter-v1") # Async sandbox
# sandbox = Sandbox("code-interpreter-v1beta1") # Sync sandbox
# sandbox = await AsyncSandbox.create("code-interpreter-v1beta1") # Async sandbox

# JS SDK
# import { Sandbox } from 'e2b'
# const sandbox = await Sandbox.create('code-interpreter-v1')
# const sandbox = await Sandbox.create('code-interpreter-v1beta1')

team_id = "460355b3-4f64-48f9-9a16-4442817f79f5"
memory_mb = 1_024
start_cmd = "sudo -u user /home/user/.jupyter/start-up.sh"
Copy link
Member Author

@mishushakov mishushakov May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one thing: this is a breaking change, should I put a script in /root/.jupyter/start-up.sh that just calls the actual start-up.sh with sudo -u user?

dockerfile = "e2b.Dockerfile"
template_name = "code-interpreter-v1"
template_id = "nlhz8vlwyupq845jsdg9"
dockerfile = "Dockerfile"
template_name = "code-interpreter-v1beta1"
template_id = "n1vc02i7rx9xg0lao9nx"
Loading

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