-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include necessary packages instead of relying on external sources
Since third-party repositories may go offline at any time or not renew their encryption keys, effort has gone in to relying on external repositories and sources as little as possible in order to better preserve a reproducable and functioning `predictprotein-docker` image. The GitHub "Free" tier limits the size of docker registry images; therefore, as of this commit and release, we're now self-hosting the `predictprotein-docker` image at: https://registry.rostlab.org/repository/rostlab/predictprotein-docker In addition, this commit introduces a `build.sh` script, which should be used instead of `docker build`, since `build.sh` will download and extract a necessary package archive for building the `predictprotein` docker image. This package archive is hosted on our servers (rostlab.org), since "free" tier services do not offer the amount of repository storage necessary.
- Loading branch information
Showing
11 changed files
with
108 additions
and
53 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export DOCKER_BUILDKIT=1 | ||
export VERSION="1.2.0" | ||
export NAME_PACKAGE="package_${VERSION}.tar.gz" | ||
export URL_PACKAGE="https://rostlab.org/public/predictprotein-docker/package/${NAME_PACKAGE}" |
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,2 @@ | ||
package/** | ||
!package/.gitkeep |
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
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,66 @@ | ||
#!/bin/sh | ||
|
||
# 20221011 TAK | ||
# This script downloads the necessary files for building the predictprotein Docker image | ||
# since the packages result in the git repository being too large for free plans on | ||
# various well-known public repositories such as GitHub, Bitbucket and Gitlab | ||
|
||
# Default values | ||
VERSION="1.2.0" | ||
NAME_PACKAGE="package_${VERSION}.tar.gz" | ||
URL_PACKAGE="https://rostlab.org/public/predictprotein-docker/package/${NAME_PACKAGE}" | ||
|
||
# Override defaults in this file | ||
. $(pwd)/.envvars | ||
|
||
# Check if necessary package directory exists | ||
if [ ! -d package/system ]; then | ||
echo "Necessary system build packages not found." | ||
# Directory package/system doesn't exist, see if the package archive exists; | ||
# If not, attempt to download it. | ||
if [ ! -f ${NAME_PACKAGE} ]; then | ||
echo "Attempting to download and extract packages archive '${NAME_PACKAGE}'..." | ||
if command -v wget &> /dev/null; then | ||
wget -c ${URL_PACKAGE} -O - | tar -xz | ||
echo "Done." | ||
elif command -v curl &> /dev/null; then | ||
curl ${URL_PACKAGE} | tar -xz | ||
echo "Done." | ||
else | ||
echo "Error!" | ||
echo "Unable to download necessary package files for Dockerfile build. You need to install either 'wget' or 'curl'." | ||
echo "Alternatively, you can manually download the necssary file to the currentl directory from: ${URL_PACKAGE}" | ||
exit 1 | ||
fi | ||
else | ||
# Here if the package/system directory doesn't exist, but the package archive does. | ||
# Possible if archive is manually downloaded, for example | ||
echo -n "Extracting ${NAME_PACKAGE}..." | ||
tar -xzf ${NAME_PACKAGE} | ||
echo "Done." | ||
# Do not keep the package archive; otherwise, it will end up in our build context adding unecessary size. | ||
echo -n "Removing ${NAME_PACKAGE}..." | ||
rm ${NAME_PACKAGE} | ||
echo "Done." | ||
fi | ||
fi | ||
|
||
# We're here if the package/system directory exists | ||
# Make sure package archive is removed | ||
if [ -f ${NAME_PACKAGE} ]; then | ||
rm ${NAME_PACKAGE} | ||
fi | ||
if command -v docker &> /dev/null; then | ||
echo "Attempting to build docker image, predictprotein-docker:${VERSION} from Dockerfile." | ||
docker build -t predictprotein . | ||
if [ $? -eq 0 ]; then | ||
echo "Finished! You may now use the 'docker run' command to start a Docker container." | ||
echo "Please refer to the predictprotein-docker README.md and docker-run documentation for usage information." | ||
else | ||
echo "There was an error building the Docker image! If you can't resolve the problem on your own, please" | ||
echo "contact us, providing abdequate information in order to assist you, at [email protected]" | ||
exit 1 | ||
fi | ||
fi | ||
|
||
exit 0 |
Empty file.
Binary file removed
BIN
-76.5 KB
package/pp-cache-mgr/libboost/libboost-filesystem1.49.0_1.49.0-3.2_amd64.deb
Binary file not shown.
Binary file removed
BIN
-158 KB
package/pp-cache-mgr/libboost/libboost-program-options1.49.0_1.49.0-3.2_amd64.deb
Binary file not shown.
Binary file removed
BIN
-448 KB
package/pp-cache-mgr/libboost/libboost-regex1.49.0_1.49.0-3.2_amd64.deb
Binary file not shown.
Binary file removed
BIN
-32.6 KB
package/pp-cache-mgr/libboost/libboost-system1.49.0_1.49.0-3.2_amd64.deb
Binary file not shown.
Binary file not shown.