Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eic_container
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
containers
eic_container
Commits
e92b8ce1
Commit
e92b8ce1
authored
1 year ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
feat: move to Dockerfile heredoc
parent
196c15b0
No related branches found
No related tags found
1 merge request
!758
feat: move to Dockerfile heredoc
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
containers/debian/base.Dockerfile
+40
-50
40 additions, 50 deletions
containers/debian/base.Dockerfile
containers/jug/dev.Dockerfile
+136
-147
136 additions, 147 deletions
containers/jug/dev.Dockerfile
containers/jug/xl.Dockerfile
+9
-10
9 additions, 10 deletions
containers/jug/xl.Dockerfile
with
185 additions
and
207 deletions
containers/debian/base.Dockerfile
+
40
−
50
View file @
e92b8ce1
...
...
@@ -17,13 +17,13 @@ ENV CLICOLOR_FORCE=1 \
## Install additional packages. Remove the auto-cleanup functionality
## for docker, as we're using the new buildkit cache instead.
RUN
--mount
=
type
=
cache,target
=
/var/cache/apt,sharing
=
locked
\
--mount
=
type
=
cache,target
=
/var/lib/apt/lists,sharing
=
locked
\
rm
-f
/etc/apt/apt.conf.d/docker-clean
\
&&
ln
-fs
/usr/share/zoneinfo/America/New_York /etc/localtime
\
&&
echo
"US/Eastern"
>
/etc/timezone
\
&&
apt-get
-yqq
update
\
&&
apt-get
-yqq
install
--no-install-recommends
\
RUN
--mount
=
type
=
cache,target
=
/var/cache/apt,sharing
=
locked
\
--mount
=
type
=
cache,target
=
/var/lib/apt/lists,sharing
=
locked
<<
EOF
rm -f /etc/apt/apt.conf.d/docker-clean
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
echo "US/Eastern" > /etc/timezone
apt-get -yqq update
apt-get -yqq install --no-install-recommends
\
bc \
bzip2 \
ca-certificates \
...
...
@@ -53,50 +53,40 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
time \
unzip \
vim-nox \
wget
\
&&
apt-get
-yqq
autoremove
\
&&
localedef
-i
en_US
-f
UTF-8 en_US.UTF-8
wget
apt-get -yqq autoremove
localedef -i en_US -f UTF-8 en_US.UTF-8
EOF
# Install updated compilers, with support for multiple base images
## Ubuntu: latest gcc from toolchain ppa, latest stable clang
## Debian: default gcc with distribution, latest stable clang
RUN
--mount
=
type
=
cache,target
=
/var/cache/apt,sharing
=
locked
\
--mount
=
type
=
cache,target
=
/var/lib/apt/lists,sharing
=
locked
\
.
/etc/os-release
\
&&
mkdir
-p
/etc/apt/source.list.d
\
&&
if
[
"
${
ID
}
"
=
"ubuntu"
]
;
then
\
echo
"deb http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu/
\
${
VERSION_CODENAME
}
main"
\
>
/etc/apt/source.list.d/ubuntu-toolchain.list
\
&&
if
[
"
${
VERSION_ID
}
"
=
"20.04"
]
;
then
GCC
=
"-10"
CLANG
=
"-12"
;
fi
\
&&
if
[
"
${
VERSION_ID
}
"
=
"22.04"
]
;
then
GCC
=
"-12"
CLANG
=
"-14"
;
fi
\
&&
curl
-s
https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
\
&&
echo
"deb http://apt.llvm.org/
${
VERSION_CODENAME
}
\
llvm-toolchain-
${
VERSION_CODENAME
}${
CLANG
}
main"
\
>
/etc/apt/source.list.d/llvm.list
\
&&
apt-get
-yqq
update
\
&&
apt-get
-yqq
install
\
gcc
${
GCC
}
g++
${
GCC
}
gfortran
${
GCC
}
\
&&
apt-get
-yqq
install
\
clang
${
CLANG
}
clang-tidy
${
CLANG
}
clang-format
${
CLANG
}
\
iwyu
\
&&
update-alternatives
--install
/usr/bin/gcc gcc
\
/usr/bin/gcc
${
GCC
}
100
\
&&
update-alternatives
--install
/usr/bin/g++ g++
\
/usr/bin/g++
${
GCC
}
100
\
&&
update-alternatives
--install
/usr/bin/gfortran gfortran
\
/usr/bin/gfortran
${
GCC
}
100
\
&&
update-alternatives
--install
/usr/bin/clang clang
\
/usr/bin/clang
${
CLANG
}
100
\
&&
update-alternatives
--install
/usr/bin/clang++ clang++
\
/usr/bin/clang++
${
CLANG
}
100
\
;
else
\
apt-get
-yqq
update
\
&&
apt-get
-yqq
install
\
gcc g++ gfortran
\
clang clang-tidy clang-format
\
iwyu
\
;
fi
\
&&
apt-get
-yqq
autoremove
\
&&
gcc
--version
\
&&
clang
--version
RUN
--mount
=
type
=
cache,target
=
/var/cache/apt,sharing
=
locked
\
--mount
=
type
=
cache,target
=
/var/lib/apt/lists,sharing
=
locked
<<
EOF
. /etc/os-release
mkdir -p /etc/apt/source.list.d
if [ "${ID}" = "ubuntu" ] ; then
echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu/${VERSION_CODENAME} main" > /etc/apt/source.list.d/ubuntu-toolchain.list
if [ "${VERSION_ID}" = "20.04" ] ; then GCC="-10" CLANG="-12" ; fi
if [ "${VERSION_ID}" = "22.04" ] ; then GCC="-12" CLANG="-14" ; fi
curl -s https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
echo "deb http://apt.llvm.org/${VERSION_CODENAME} llvm-toolchain-${VERSION_CODENAME}${CLANG} main" > /etc/apt/source.list.d/llvm.list
apt-get -yqq update
apt-get -yqq install gcc${GCC} g++${GCC} gfortran${GCC}
apt-get -yqq install clang${CLANG} clang-tidy${CLANG} clang-format${CLANG}
apt-get -yqq install iwyu
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc${GCC} 100
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++${GCC} 100
update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran${GCC} 100
update-alternatives --install /usr/bin/clang clang /usr/bin/clang${CLANG} 100
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++${CLANG} 100
else
apt-get -yqq update
apt-get -yqq install gcc g++ gfortran
apt-get -yqq install clang clang-tidy clang-format
apt-get -yqq install iwyu
fi
apt-get -yqq autoremove
gcc --version
clang --version
EOF
This diff is collapsed.
Click to expand it.
containers/jug/dev.Dockerfile
+
136
−
147
View file @
e92b8ce1
This diff is collapsed.
Click to expand it.
containers/jug/xl.Dockerfile
+
9
−
10
View file @
e92b8ce1
...
...
@@ -17,8 +17,7 @@ ARG jobs=8
## the date
ARG
JUG_VERSION=1
RUN
cd
/tmp
\
&&
echo
" - jug_xl:
${
JUG_VERSION
}
"
>>
/etc/jug_info
RUN
echo
" - jug_xl:
${
JUG_VERSION
}
"
>>
/etc/jug_info
## also install detector/ip geometries into opt
ARG
NIGHTLY=''
...
...
@@ -31,11 +30,11 @@ ADD https://api.github.com/repos/eic/ip6 /tmp/ip6.json
ADD
https://api.github.com/repos/eic/epic /tmp/epic.json
COPY
setup_detectors.py /tmp
COPY
--from=detectors detectors.yaml /tmp
RUN
--mount
=
type
=
cache,target
=
/ccache/,sharing
=
locked,id
=
${
TARGETPLATFORM
}
\
cd
/tmp
\
&&
export
CCACHE_DIR
=
/ccache
\
&&
[
"z
$NIGHTLY
"
=
"z1"
]
&&
NIGHTLY_FLAG
=
"--nightly"
||
NIGHTLY_FLAG
=
""
\
&&
/tmp/setup_detectors.py
--prefix
/opt/detector
--config
/tmp/detectors.yaml
\
$NIGHTLY_FLAG
\
&&
ccache
--show-stats
\
&&
rm
/tmp/setup_detectors.py
RUN
--mount
=
type
=
cache,target
=
/ccache/,sharing
=
locked,id
=
${
TARGETPLATFORM
}
<<
EOF
cd /tmp
export CCACHE_DIR=/ccache
[ "z$NIGHTLY" = "z1" ] && NIGHTLY_FLAG="--nightly" || NIGHTLY_FLAG=""
/tmp/setup_detectors.py --prefix /opt/detector --config /tmp/detectors.yaml
$NIGHTLY_FLAG
ccache --show-stats
rm /tmp/setup_detectors.py
EOF
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