Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support cross-platform docker images #157

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "clearml-web"]
path = webserver
url = [email protected]:allegroai/clearml-web.git
22 changes: 12 additions & 10 deletions docker/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
FROM centos/nodejs-12-centos7 AS webapp
FROM node:12.21.0-buster-slim AS webapp

ARG CLEARML_WEB_GIT_URL=https://github.com/allegroai/clearml-web.git
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential=12.6 \
python=2.7.16-1 \
&& rm -rf /var/lib/apt/lists/*

USER root
WORKDIR /opt

RUN git clone ${CLEARML_WEB_GIT_URL} clearml-web
RUN mv clearml-web /opt/open-webapp
COPY --chmod=744 docker/build/internal_files/build_webapp.sh /tmp/internal_files/
COPY ./webserver ./open-webapp
COPY docker/build/internal_files/build_webapp.sh /tmp/internal_files/
RUN /bin/bash -c '/tmp/internal_files/build_webapp.sh'

FROM centos:7 AS staging_image
COPY --chmod=744 docker/build/internal_files/entrypoint.sh /opt/clearml/
FROM centos:centos7.9.2009 AS staging_image
COPY docker/build/internal_files/entrypoint.sh /opt/clearml/
COPY fileserver /opt/clearml/fileserver/
COPY apiserver /opt/clearml/apiserver/

FROM centos:7
FROM centos:centos7.9.2009
COPY --from=staging_image /opt/clearml/ /opt/clearml/

COPY --chmod=744 docker/build/internal_files/final_image_preparation.sh /tmp/internal_files/
COPY docker/build/internal_files/final_image_preparation.sh /tmp/internal_files/
COPY docker/build/internal_files/clearml.conf.template /tmp/internal_files/
COPY docker/build/internal_files/clearml_subpath.conf.template /tmp/internal_files/
RUN /bin/bash -c '/tmp/internal_files/final_image_preparation.sh'
Expand Down
2 changes: 1 addition & 1 deletion docker/build/internal_files/build_webapp.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -x
set -e

cd /opt/open-webapp/
npm ci --unsafe-perm node-sass
echo n | npm ci --unsafe-perm node-sass

cd /opt/open-webapp/
npm run build
Empty file modified docker/build/internal_files/entrypoint.sh
100644 → 100755
Empty file.
9 changes: 6 additions & 3 deletions docker/build/internal_files/final_image_preparation.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ set -o nounset
set -o pipefail

yum update -y
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
#yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y epel-release
yum install -y python36 python36-pip nginx gcc gcc-c++ python3-devel gettext
yum -y upgrade
#yum -y upgrade
python3 -m pip install setuptools-rust
python3 -m pip install --upgrade pip
python3 -m pip install -r /opt/clearml/fileserver/requirements.txt
python3 -m pip install -r /opt/clearml/apiserver/requirements.txt
mkdir -p /opt/clearml/log
Expand All @@ -16,4 +19,4 @@ ln -s /dev/stderr /var/log/nginx/error.log
mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.orig
mv /tmp/internal_files/clearml.conf.template /etc/nginx/clearml.conf.template
mv /tmp/internal_files/clearml_subpath.conf.template /etc/nginx/clearml_subpath.conf.template
yum clean all
yum clean all
1 change: 1 addition & 0 deletions webserver
Submodule webserver added at b96f72