allegroai / clearml-server

ClearML - Auto-Magical CI/CD to streamline your AI workload. Experiment Management, Data Management, Pipeline, Orchestration, Scheduling & Serving in one MLOps/LLMOps solution
https://clear.ml/docs
Other
381 stars 131 forks source link

Dockerfile base image outdated #192

Open annaelee opened 1 year ago

annaelee commented 1 year ago

When building the clearml-server docker file, I run into the following error when building. I need to build this locally, because I want to test local changes I make to the clearml-web code. The root error seems to be that Nodejs is outdated. Is there an updated Dockerfile somewhere that is being used now that isn't checked in that uses a different base image other than centos/nodejs-12-centos7? It would be nice if this would build out of the box without having to make any changes.

(base) [demo clearml-server]$ docker build -t test-docker -f docker/build/Dockerfile .
Sending build context to Docker daemon  6.365MB
Step 1/29 : FROM centos/nodejs-12-centos7 AS webapp
 ---> a1936ac4ed7c
Step 2/29 : ARG CLEARML_WEB_GIT_URL=https://github.com/allegroai/clearml-web.git
 ---> Running in d9822f5a93c9
Removing intermediate container d9822f5a93c9
 ---> cac4d91eb19f
Step 3/29 : USER root
 ---> Running in 6646976dfc9e
Removing intermediate container 6646976dfc9e
 ---> d15d87f244e8
Step 4/29 : WORKDIR /opt
 ---> Running in e9377024b96f
Removing intermediate container e9377024b96f
 ---> c45b90ed42fd
Step 5/29 : RUN git clone ${CLEARML_WEB_GIT_URL} clearml-web
 ---> Running in 50ec2a093ed3
Cloning into 'clearml-web'...
Removing intermediate container 50ec2a093ed3
 ---> 2032396cfac7
Step 6/29 : RUN mv clearml-web /opt/open-webapp
 ---> Running in 2a885e1aca84
Removing intermediate container 2a885e1aca84
 ---> 099b3abd299d
Step 7/29 : COPY docker/build/internal_files/build_webapp.sh /tmp/internal_files/
 ---> d54a058b2f95
Step 8/29 : RUN /bin/bash -c '/tmp/internal_files/build_webapp.sh'
 ---> Running in b39fcebe4c28
+ set -e
+ cd /opt/open-webapp/
+ npm ci --legacy-peer-deps

> nice-napi@1.0.2 install /opt/open-webapp/node_modules/nice-napi
> node-gyp-build

gyp ERR! clean error 
gyp ERR! stack Error: EACCES: permission denied, rmdir 'build'
gyp ERR! System Linux 5.15.93-55.139.amzn2.x86_64
gyp ERR! command "/opt/rh/rh-nodejs12/root/usr/bin/node" "/opt/rh/rh-nodejs12/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/open-webapp/node_modules/nice-napi
gyp ERR! node -v v12.21.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 

> esbuild@0.16.17 postinstall /opt/open-webapp/node_modules/esbuild
> node install.js

> @fortawesome/fontawesome-free@6.3.0 postinstall /opt/open-webapp/node_modules/@fortawesome/fontawesome-free
> node attribution.js

Font Awesome Free 6.3.0 by @fontawesome - https://fontawesome.com
License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
Copyright 2023 Fonticons, Inc.

added 1300 packages in 23.485s
+ cd /opt/open-webapp/
+ npm --max-old-space-size=8192 run build

> clearml-webapp@1.10.0 build /opt/open-webapp
> npx ng build --configuration production --source-map --vendor-chunk

Node.js version v12.21.0 detected.
The Angular CLI requires a minimum Node.js version of either v14.20, v16.13 or v18.10.

Please update your Node.js version or visit https://nodejs.org/ for additional instructions.

npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! clearml-webapp@1.10.0 build: `npx ng build --configuration production --source-map --vendor-chunk`
npm ERR! Exit status 3
npm ERR! 
npm ERR! Failed at the clearml-webapp@1.10.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /opt/app-root/src/.npm/_logs/2023-04-17T15_53_44_540Z-debug.log
The command '/bin/sh -c /bin/bash -c '/tmp/internal_files/build_webapp.sh'' returned a non-zero code: 3
jkhenning commented 1 year ago

Hi @annaelee, we're checking this out and will update soon

jkhenning commented 1 year ago

@annaelee we've pushed an updated Docekrfile and build script to the master branch - please check it out and if it works for you, you're welcome to close the issue 🙂