Skip to content

Commit 0b40da6

Browse files
committed
Remove unnecessary user: root from runCmd examples
The default template user doesn't require explicit root for pip install.
1 parent e2379ab commit 0b40da6

1 file changed

Lines changed: 6 additions & 24 deletions

File tree

docs/troubleshooting/pip-install-error.mdx

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,12 @@ Set the `TMPDIR` environment variable to a disk-backed path so pip downloads don
3131
<CodeGroup>
3232
```typescript JavaScript & TypeScript
3333
const template = Template()
34-
.runCmd(
35-
'TMPDIR=/var/tmp pip install --no-cache-dir torch sentence-transformers',
36-
{ user: 'root' }
37-
)
34+
.runCmd('TMPDIR=/var/tmp pip install --no-cache-dir torch sentence-transformers')
3835
```
3936
```python Python
4037
template = (
4138
Template()
42-
.run_cmd(
43-
"TMPDIR=/var/tmp pip install --no-cache-dir torch sentence-transformers",
44-
user="root",
45-
)
39+
.run_cmd("TMPDIR=/var/tmp pip install --no-cache-dir torch sentence-transformers")
4640
)
4741
```
4842
</CodeGroup>
@@ -54,26 +48,14 @@ E2B sandboxes don't have GPUs, so there's no reason to download CUDA dependencie
5448
<CodeGroup>
5549
```typescript JavaScript & TypeScript
5650
const template = Template()
57-
.runCmd(
58-
'pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu',
59-
{ user: 'root' }
60-
)
61-
.runCmd(
62-
'echo "torch" > /tmp/constraints.txt && pip install --no-cache-dir -c /tmp/constraints.txt sentence-transformers',
63-
{ user: 'root' }
64-
)
51+
.runCmd('pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu')
52+
.runCmd('echo "torch" > /tmp/constraints.txt && pip install --no-cache-dir -c /tmp/constraints.txt sentence-transformers')
6553
```
6654
```python Python
6755
template = (
6856
Template()
69-
.run_cmd(
70-
"pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu",
71-
user="root",
72-
)
73-
.run_cmd(
74-
'echo "torch" > /tmp/constraints.txt && pip install --no-cache-dir -c /tmp/constraints.txt sentence-transformers',
75-
user="root",
76-
)
57+
.run_cmd("pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu")
58+
.run_cmd('echo "torch" > /tmp/constraints.txt && pip install --no-cache-dir -c /tmp/constraints.txt sentence-transformers')
7759
)
7860
```
7961
</CodeGroup>

0 commit comments

Comments
 (0)