Skip to content

Dev Container should run as non-root user #796

@mnuman

Description

@mnuman

Bug description

The current setup runs the devcontainer as the root user, causing the jupyter server to fail from starting up. A work-around could be to start the jupyter server in the container with the --allow-root arguments, e.g.
uv run jupyter lab --allow-root, but I think the consensus is that it preferable to run docker containers as non-root user whenever possible.
The diagnostics script does not seem to be working correctly, instead it returns an "Illegal Instruction" message ... (see below)

What operating system are you using?

macOS

Where do you run your code?

Local (laptop, desktop)

Environment

source /workspaces/LLMs-from-scratch/.venv/bin/activate
root@86a19c43e05f:/workspaces/LLMs-from-scratch# source /workspaces/LLMs-from-scratch/.venv/bin/activate
(llms-from-scratch) root@86a19c43e05f:/workspaces/LLMs-from-scratch# curl --ssl-no-revoke -O https://raw.github.com/rasbt/LLMs-from-scratch/main/setup/02_installing-python-libraries/python_environment_check.py  \
-O https://raw.github.com/rasbt/LLMs-from-scratch/main/requirements.txt

python python_environment_check.py
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5079  100  5079    0     0  17797      0 --:--:-- --:--:-- --:--:-- 18010
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   457  100   457    0     0   3139      0 --:--:-- --:--:-- --:--:--  3173
[OK] Your Python version is 3.11.10
Illegal instruction
(llms-from-scratch) root@86a19c43e05f:/workspaces/LLMs-from-scratch#


Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions