Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
backend-ci
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
sysadmin
backend-ci
Commits
884dba79
Commit
884dba79
authored
2 years ago
by
Jakub Pelka
Browse files
Options
Downloads
Patches
Plain Diff
Add npuser, enable pw-less sudo, add git global safe dir
parent
7ab50284
No related branches found
No related tags found
1 merge request
!2
XX-4183/rootless CI
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+4
-0
4 additions, 0 deletions
.gitlab-ci.yml
cuda-go/Dockerfile
+10
-1
10 additions, 1 deletion
cuda-go/Dockerfile
wasm-go/Dockerfile
+15
-5
15 additions, 5 deletions
wasm-go/Dockerfile
with
29 additions
and
6 deletions
.gitlab-ci.yml
+
4
−
0
View file @
884dba79
...
...
@@ -9,6 +9,10 @@ imagebuild:
-
cd cuda-go
-
chmod +x build-all-images.sh
-
./build-all-images.sh
-
cd ..
-
cd wasm-go
-
chmod +x build-image.sh
-
./build-image.sh
variables
:
#DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR
:
"
/certs"
...
...
This diff is collapsed.
Click to expand it.
cuda-go/Dockerfile
+
10
−
1
View file @
884dba79
...
...
@@ -8,7 +8,7 @@ ENV CUDA_VER=1.11.1
#RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
RUN
apt update
RUN
DEBIAN_FRONTEND
=
noninteractive
TZ
=
Etc/UTC apt-get
-y
install
tzdata wget git libgmp-dev bc curl nsight-systems-2020.3.4 jq clang build-essential valgrind unzip zip
RUN
DEBIAN_FRONTEND
=
noninteractive
TZ
=
Etc/UTC apt-get
-y
install
tzdata wget git libgmp-dev bc curl nsight-systems-2020.3.4 jq clang build-essential valgrind unzip zip
sudo
RUN
apt upgrade
-y
RUN
apt
install
-y
software-properties-common
RUN
wget https://go.dev/dl/go1.17.13.linux-amd64.tar.gz
...
...
@@ -40,3 +40,12 @@ COPY upload-artifact-nohash.sh /upload-artifact-nohash.sh
RUN
chmod
+x /upload-artifact-nohash.sh
COPY
hash-file.sh /hash-file.sh
RUN
chmod
+x /hash-file.sh
RUN
git config
--global
--add
safe.directory
'*'
RUN
useradd
--system
--create-home
--shell
/bin/bash npuser
RUN
adduser npuser
sudo
RUN
echo
'%sudo ALL=(ALL) NOPASSWD:ALL'
>>
/etc/sudoers
USER
npuser
RUN
git config
--global
--add
safe.directory
'*'
This diff is collapsed.
Click to expand it.
wasm-go/Dockerfile
+
15
−
5
View file @
884dba79
...
...
@@ -5,13 +5,14 @@ ARG GO_VER
ENV
GO_VER=$GO_VER
RUN
apt update
RUN
DEBIAN_FRONTEND
=
noninteractive
TZ
=
Etc/UTC apt-get
-y
install
tzdata
RUN
DEBIAN_FRONTEND
=
noninteractive
TZ
=
Etc/UTC apt-get
-y
install
tzdata
git libgmp-dev bc curl wget jq
RUN
apt upgrade
-y
RUN
apt
install
-y
software-properties-common
RUN
add-apt-repository
-y
ppa:longsleep/golang-backports
RUN
apt
install
-y
golang-
$GO_VER
git libgmp-dev bc curl wget jq
RUN
ln
-s
/usr/lib/go-
$GO_VER
/bin/go /usr/bin/go
RUN
ln
-s
/usr/lib/go-
$GO_VER
/bin/gofmt /usr/bin/gofmt
RUN
wget https://go.dev/dl/go1.17.13.linux-amd64.tar.gz
RUN
tar
-C
/usr/local
-xzf
go1.17.13.linux-amd64.tar.gz
RUN
ln
-s
/usr/local/go/bin/go /usr/bin/go
RUN
ln
-s
/usr/local/go/bin/gofmt /usr/bin/gofmt
RUN
go version
RUN
go
install
github.com/haya14busa/goverage@latest
...
...
@@ -37,3 +38,12 @@ COPY upload-artifact-nohash.sh /upload-artifact-nohash.sh
RUN
chmod
+x /upload-artifact-nohash.sh
COPY
hash-file.sh /hash-file.sh
RUN
chmod
+x /hash-file.sh
RUN
git config
--global
--add
safe.directory
'*'
RUN
useradd
--system
--create-home
--shell
/bin/bash npuser
RUN
adduser npuser
sudo
RUN
echo
'%sudo ALL=(ALL) NOPASSWD:ALL'
>>
/etc/sudoers
USER
npuser
RUN
git config
--global
--add
safe.directory
'*'
\ No newline at end of file
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