diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..04f37a7d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "clearml-web"] + path = webserver + url = git@github.com:allegroai/clearml-web.git diff --git a/docker/build/Dockerfile b/docker/build/Dockerfile index 906e8bc8..5f214561 100644 --- a/docker/build/Dockerfile +++ b/docker/build/Dockerfile @@ -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' diff --git a/docker/build/internal_files/build_webapp.sh b/docker/build/internal_files/build_webapp.sh old mode 100644 new mode 100755 index 52a54c93..7a55ee1c --- a/docker/build/internal_files/build_webapp.sh +++ b/docker/build/internal_files/build_webapp.sh @@ -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 diff --git a/docker/build/internal_files/entrypoint.sh b/docker/build/internal_files/entrypoint.sh old mode 100644 new mode 100755 diff --git a/docker/build/internal_files/final_image_preparation.sh b/docker/build/internal_files/final_image_preparation.sh old mode 100644 new mode 100755 index 9f60cff1..49daba65 --- a/docker/build/internal_files/final_image_preparation.sh +++ b/docker/build/internal_files/final_image_preparation.sh @@ -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 @@ -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 \ No newline at end of file +yum clean all diff --git a/webserver b/webserver new file mode 160000 index 00000000..b96f723a --- /dev/null +++ b/webserver @@ -0,0 +1 @@ +Subproject commit b96f723af166bba10fd10b1d3ac3a8e6f2126b5e