Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
containerize
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package registry
Container Registry
Operate
Terraform modules
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Studio R215
containerize
Commits
19c60925
Commit
19c60925
authored
1 month ago
by
Sebastian Karius
Browse files
Options
Downloads
Patches
Plain Diff
switch to preinstalled ubuntu user
parent
51568bf5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docker/coder-ubuntu_24-python/Dockerfile
+10
-14
10 additions, 14 deletions
docker/coder-ubuntu_24-python/Dockerfile
with
10 additions
and
14 deletions
docker/coder-ubuntu_24-python/Dockerfile
+
10
−
14
View file @
19c60925
FROM
ubuntu:24.04
LABEL
authors="sebastian"
SHELL
["/bin/bash", "-c"]
ENV
DEBIAN_FRONTEND=noninteractive
RUN
apt-get update
&&
apt-get upgrade
-y
...
...
@@ -42,23 +40,21 @@ RUN apt-get install -y htop \
pv
\
brotli
# create coder user
RUN
useradd
-ms
/bin/bash coder
RUN
usermod
-aG
sudo
coder
# allow sudo without password
RUN
echo
'%sudo ALL=(ALL) NOPASSWD:ALL'
>>
/etc/sudoers
# clean up
RUN
apt-get clean
RUN
rm
-rf
/var/lib/apt/lists/
*
/tmp/
*
/var/tmp/
*
# switch to coder user
USER
coder
WORKDIR
/home/coder
# add ubuntu user to sudo
RUN
usermod
-aG
sudo
ubuntu
# allow sudo without password
RUN
echo
'%sudo ALL=(ALL) NOPASSWD:ALL'
>>
/etc/sudoers
# switch to ubuntu user
USER
ubuntu
WORKDIR
/home/ubuntu
# activate miniconda
RUN
source
/opt/miniconda3/bin/activate
RUN
/opt/miniconda3/bin/conda init
--all
ENV
PATH="${PATH}:/opt/miniconda3/bin"
...
...
@@ -66,7 +62,7 @@ ENV PATH="${PATH}:/opt/miniconda3/bin"
ENV
PATH="${PATH}:/opt/poetry/bin"
# add .local/bin to PATH to be able to directly call python modules installed by pipx
ENV
PATH="${PATH}:/home/
coder
/.local/bin"
ENV
PATH="${PATH}:/home/
ubuntu
/.local/bin"
# prevent tensorflow from allocation all vram
ENV
TF_FORCE_GPU_ALLOW_GROWTH=true
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment