-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from JuliaCI/tb/config
Introduce a Config object, and other clean-ups.
- Loading branch information
Showing
7 changed files
with
206 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM archlinux:base-devel | ||
|
||
RUN pacman -Suy --noconfirm --needed \ | ||
# download engines | ||
curl ca-certificates \ | ||
# essential tools | ||
git unzip sudo \ | ||
# toolchain | ||
gcc-fortran \ | ||
# Any package that needs a display (e.g. Gtk.jl) | ||
xorg-server-xvfb \ | ||
# clean-up | ||
&& find /var/cache/pacman/ -type f -delete | ||
|
||
RUN mkdir /storage /cache | ||
|
||
COPY ./entrypoint.sh / | ||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash -ue | ||
|
||
|
||
# prepare the user | ||
|
||
USER=$1 | ||
USER_ID=$2 | ||
GROUP=$3 | ||
GROUP_ID=$4 | ||
shift 4 | ||
|
||
groupadd --gid $GROUP_ID $GROUP | ||
echo "$GROUP ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | ||
|
||
useradd --uid $USER_ID --gid $GROUP_ID --shell /bin/bash --no-create-home --no-user-group $USER | ||
# manual home creation because it might be mounted tmpfs already | ||
mkdir -p /home/$USER | ||
chown $USER:$GROUP /home/$USER | ||
|
||
# make the storage and cache writable, in case we didn't mount one | ||
chown $USER:$GROUP /storage /cache | ||
|
||
|
||
# prepare the depot | ||
|
||
mkdir /home/$USER/.julia | ||
chown $USER:$GROUP /home/$USER/.julia | ||
|
||
mkdir -p /storage/artifacts | ||
chown $USER:$GROUP /storage/artifacts | ||
ln -s /storage/artifacts /home/$USER/.julia/artifacts | ||
|
||
mkdir -p /cache/registries | ||
chown $USER:$GROUP /cache/registries | ||
ln -s /cache/registries /home/$USER/.julia/registries | ||
|
||
|
||
# run the command | ||
|
||
# discover libraries (which may be mounted at run time, e.g., libcuda by the Docker runtime) | ||
ldconfig | ||
|
||
cd /home/$USER | ||
sudo --user $USER --set-home \ | ||
CI=true PKGEVAL=true JULIA_PKGEVAL=true \ | ||
JULIA_PKG_PRECOMPILE_AUTO=0 \ | ||
PYTHON="" R_HOME="*" \ | ||
-- "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.