Skip to content

Commit

Permalink
Adapt and build base images (#21)
Browse files Browse the repository at this point in the history
* feat: adapt base images to new CI workflow

* feat: add version files
  • Loading branch information
CodeLionX authored Nov 20, 2023
1 parent 99fdf77 commit 2b78aa2
Show file tree
Hide file tree
Showing 18 changed files with 157 additions and 18 deletions.
21 changes: 21 additions & 0 deletions 0-base-images/java-base/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020-2023 Phillip Wenig and Sebastian Schmidl

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 9 additions & 2 deletions 0-base-images/java-base/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,18 @@ if [[ ! -z "$LOCAL_UID" ]] && [[ ! -z "$LOCAL_GID" ]]; then
chown -R "$Z_UID:$Z_GID" .
fi

# Either run algorithm or the supplied executable
if [[ "$1" = "execute-algorithm" ]]; then
# check and execute command
if [[ "$1" == "manifest" ]]; then
# output the algorithm manifest
cat /app/manifest.json

elif [[ "$1" == "execute-algorithm" ]]; then
# run algorithm
shift
exec setpriv --reuid=$Z_UID --regid=$Z_GID --init-groups -- java -jar "$ALGORITHM_MAIN" "$@"

else
# just run supplied command inside container
exec setpriv --reuid=$Z_UID --regid=$Z_GID --init-groups -- "$@"
fi

Expand Down
1 change: 1 addition & 0 deletions 0-base-images/java-base/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.3.0
21 changes: 21 additions & 0 deletions 0-base-images/python2-base/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020-2023 Phillip Wenig and Sebastian Schmidl

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 9 additions & 2 deletions 0-base-images/python2-base/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,18 @@ if [[ ! -z "$LOCAL_UID" ]] && [[ ! -z "$LOCAL_GID" ]]; then
chown -R "$Z_UID:$Z_GID" .
fi

# Either run algorithm or the supplied executable
if [[ "$1" = "execute-algorithm" ]]; then
# check and execute command
if [[ "$1" == "manifest" ]]; then
# output the algorithm manifest
cat /app/manifest.json

elif [[ "$1" == "execute-algorithm" ]]; then
# run algorithm
shift
exec setpriv --reuid=$Z_UID --regid=$Z_GID --init-groups -- python "$ALGORITHM_MAIN" "$@"

else
# just run supplied command inside container
exec setpriv --reuid=$Z_UID --regid=$Z_GID --init-groups -- "$@"
fi

Expand Down
1 change: 1 addition & 0 deletions 0-base-images/python2-base/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.3.0
4 changes: 2 additions & 2 deletions 0-base-images/python3-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ VOLUME ["/data", "/results"]

WORKDIR /app

COPY entrypoint.sh /entrypoint.sh

COPY requirements.txt /tmp/
# install requirements and cleanup afterwards (also removes tests and cached cython files of the dependencies)
RUN set -eux; \
Expand All @@ -24,7 +26,5 @@ RUN set -eux; \
\) -exec rm -rf '{}' +; \
rm -rf /tmp/* /var/tmp/* ~/.cache/pip

COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "execute-algorithm" ]
5 changes: 0 additions & 5 deletions 0-base-images/python3-torch/Dockerfile

This file was deleted.

21 changes: 21 additions & 0 deletions 0-base-images/python36-base/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020-2023 Phillip Wenig and Sebastian Schmidl

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 9 additions & 2 deletions 0-base-images/python36-base/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,18 @@ if [[ ! -z "$LOCAL_UID" ]] && [[ ! -z "$LOCAL_GID" ]]; then
chown -R "$Z_UID:$Z_GID" .
fi

# Either run algorithm or the supplied executable
if [[ "$1" = "execute-algorithm" ]]; then
# check and execute command
if [[ "$1" == "manifest" ]]; then
# output the algorithm manifest
cat /app/manifest.json

elif [[ "$1" == "execute-algorithm" ]]; then
# run algorithm
shift
exec setpriv --reuid=$Z_UID --regid=$Z_GID --init-groups -- python "$ALGORITHM_MAIN" "$@"

else
# just run supplied command inside container
exec setpriv --reuid=$Z_UID --regid=$Z_GID --init-groups -- "$@"
fi

Expand Down
1 change: 1 addition & 0 deletions 0-base-images/python36-base/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.3.0
1 change: 0 additions & 1 deletion 0-base-images/r-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ RUN set -eux; \
rm -rf /tmp/* /var/tmp/*

# Setup TimeEval integration

VOLUME ["/data", "/results"]

WORKDIR /app
Expand Down
21 changes: 21 additions & 0 deletions 0-base-images/r4-base/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020-2023 Phillip Wenig and Sebastian Schmidl

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 9 additions & 2 deletions 0-base-images/r4-base/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,18 @@ if [[ ! -z "$LOCAL_UID" ]] && [[ ! -z "$LOCAL_GID" ]]; then
chown -R "$Z_UID:$Z_GID" .
fi

# Either run algorithm or the supplied executable
if [[ "$1" = "execute-algorithm" ]]; then
# check and execute command
if [[ "$1" == "manifest" ]]; then
# output the algorithm manifest
cat /app/manifest.json

elif [[ "$1" == "execute-algorithm" ]]; then
# run algorithm
shift
exec setpriv --reuid=$Z_UID --regid=$Z_GID --init-groups -- Rscript "$ALGORITHM_MAIN" "$@"

else
# just run supplied command inside container
exec setpriv --reuid=$Z_UID --regid=$Z_GID --init-groups -- "$@"
fi

Expand Down
1 change: 1 addition & 0 deletions 0-base-images/r4-base/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.3.0
21 changes: 21 additions & 0 deletions 0-base-images/rust-base/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020-2023 Phillip Wenig and Sebastian Schmidl

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 9 additions & 2 deletions 0-base-images/rust-base/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,18 @@ if [[ ! -z "$LOCAL_UID" ]] && [[ ! -z "$LOCAL_GID" ]]; then
chown -R "$Z_UID:$Z_GID" .
fi

# Either run algorithm or the supplied executable
if [[ "$1" = "execute-algorithm" ]]; then
# check and execute command
if [[ "$1" == "manifest" ]]; then
# output the algorithm manifest
cat /app/manifest.json

elif [[ "$1" == "execute-algorithm" ]]; then
# run algorithm
shift
exec setpriv --reuid=$Z_UID --regid=$Z_GID --init-groups -- "$ALGORITHM_MAIN" "$@"

else
# just run supplied command inside container
exec setpriv --reuid=$Z_UID --regid=$Z_GID --init-groups -- "$@"
fi

Expand Down
1 change: 1 addition & 0 deletions 0-base-images/rust-base/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.3.0

0 comments on commit 2b78aa2

Please sign in to comment.