sagemathinc / cocalc-docker

DEPRECATED (was -- Docker setup for running CoCalc as downloadable software on your own computer)
https://cocalc.com
Other
398 stars 103 forks source link

Running cocalc on IBM - "exec format error" #115

Closed WP-LKL closed 3 years ago

WP-LKL commented 3 years ago

docker start cocalc cocalc docker logs cocalc -f yields: standard_init_linux.go:211: exec user process caused "exec format error"

$ cat /proc/cpuinfo
> vendor_id       : IBM/S390

-- The front-page reminds us that only Intel is supported, but is there a docker image or a way to run this amazing software on IBM cloud?

williamstein commented 3 years ago

a way to run this amazing software on IBM cloud?

You can try to build the docker image from source and see what happens. I made a more minimal version of cocalc-docker that you might want to try first: https://github.com/cocalc/cocalc-personal

You would clone that repo, then do something like sudo docker build -t cocalc .

WP-LKL commented 3 years ago

It failed (twice), seemingly at step 12/30? I've attached the full log below.

root@[UUID]:~/cocalc-personal# sudo docker build -t cocalc .
Sending build context to Docker daemon  440.3kB
Step 1/30 : FROM ubuntu:20.04
 ---> 736ae9a6ca9f
Step 2/30 : LABEL William Stein <wstein@sagemath.com>
 ---> Using cache
 ---> fe8d641c1838
Step 3/30 : USER root
 ---> Using cache
 ---> a27bd062b592
Step 4/30 : ENV LC_ALL=C.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US:en TERM=screen
 ---> Using cache
 ---> 6c7d084a29b2
Step 5/30 : ENV COCALC_PERSONAL=yes
 ---> Using cache
 ---> 0bc90288b7de
Step 6/30 : RUN rm /bin/sh && ln -s /bin/bash /bin/sh
 ---> Using cache
 ---> 776a79963e8c
Step 7/30 : RUN      apt-get update   && DEBIAN_FRONTEND=noninteractive apt-get upgrade -y   && DEBIAN_FRONTEND=noninteractive apt-get install -y        software-properties-common        liblog-log4perl-perl        flex        bison        libreadline-dev        net-tools        wget        git        python3        python3-pip        make        g++        sudo        psmisc        haproxy        nginx        rsync        vim        inetutils-ping        ssh        m4        libpq5        libpq-dev        build-essential        automake        dpkg-dev        libssl-dev        libcurl4-openssl-dev        smem        python3-yaml        python3-matplotlib        python3-jupyter*        python3-ipywidgets        python        jupyter        locales        locales-all        clang-format        yapf3        nodejs        npm        libxml2-dev        libxslt-dev        libsqlite3-dev
 ---> Using cache
 ---> 5e4772b177ef
Step 8/30 : RUN npm install -g --prefix=/usr -f npm@7.3.0
 ---> Using cache
 ---> dde621bfc3ae
Step 9/30 : ARG commit=HEAD
 ---> Using cache
 ---> 65ef58448668
Step 10/30 : RUN      git clone https://github.com/sagemathinc/cocalc.git   && cd /cocalc && git pull && git fetch origin && git checkout ${commit:-HEAD}
 ---> Using cache
 ---> 472bee559925
Step 11/30 : RUN      cd /cocalc/src   && . ./smc-env   && npm run make
 ---> Using cache
 ---> e330ad8962fb
Step 12/30 : RUN      cd /cocalc/src   && . ./smc-env   && ./install.py all --web
 ---> Running in a201dafa8715
npm WARN EBADENGINE Unsupported engine { package: 'forever@0.10.0',
npm WARN EBADENGINE   required: { node: '0.8.x' },
npm WARN EBADENGINE   current: { node: 'v10.19.0', npm: '7.3.0' } }
npm WARN EBADENGINE Unsupported engine { package: 'start-stop-daemon@0.1.1',
npm WARN EBADENGINE   required: { node: '0.8.x' },
npm WARN EBADENGINE   current: { node: 'v10.19.0', npm: '7.3.0' } }
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated fsevents@1.2.9: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated minimatch@0.0.5: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated request@2.9.203: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.9.203: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.9.203: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.9.203: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated chokidar@1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2"
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2"
npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated har-validator@5.1.3: this library is no longer supported
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin

added 1044 packages, and audited 1111 packages in 1m

33 packages are looking for funding
  run `npm fund` for details

22 vulnerabilities (11 low, 6 moderate, 5 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm aunpm WARN deprecated @babel/polyfill@7.10.4: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
ditnpm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
 npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)

added 1386 packages, and audited 1387 packages in 29s

3 low severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm WARN deprecated core-js@2.6.9: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.

> cocalc-webapp-resources@1.0.0 postinstall
> python3 setup.py

symlink with    version 'fontawesome-free-5.15.2' -> 'node_modules/@fortawesome/fontawesome-free/'
symlink without version 'fontawesome-free' -> 'fontawesome-free-5.15.2'
symlink with    version 'bootstrap-3.4.1' -> 'node_modules/bootstrap/dist/css/'
symlink without version 'bootstrap' -> 'bootstrap-3.4.1'
symlink with    version 'codemirror-5.59.2' -> 'node_modules/codemirror/'
symlink without version 'codemirror' -> 'codemirror-5.59.2'
symlink with    version 'commander-2.20.3' -> 'node_modules/commander/'
symlink without version 'commander' -> 'commander-2.20.3'
symlink with    version 'katex-0.12.0' -> 'node_modules/katex/dist/'
symlink without version 'katex' -> 'katex-0.12.0'
symlink with    version 'roboto-fontface-0.10.0' -> 'node_modules/roboto-fontface/'
symlink without version 'roboto-fontface' -> 'roboto-fontface-0.10.0'

added 6 packages, and audited 7 packages in 7s

found 0 vulnerabilities

added 486 packages, and audited 487 packages in 4m

found 0 vulnerabilities

added 2525 packages, and audited 2592 packages in 5m

47 packages are looking for funding
  run `npm fund` for details

23 vulnerabilities (16 low, 2 moderate, 5 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
make: '../webapp-lib/examples/examples.json' is up to date.
npm WARN deprecated fsevents@1.2.9: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

added 1386 packages, and audited 1387 packages in 38s

3 low severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

> cocalc-webapp-resources@1.0.0 postinstall
> python3 setup.py

symlink with    version 'fontawesome-free-5.15.2' -> 'node_modules/@fortawesome/fontawesome-free/'
symlink without version 'fontawesome-free' -> 'fontawesome-free-5.15.2'
symlink with    version 'bootstrap-3.4.1' -> 'node_modules/bootstrap/dist/css/'
symlink without version 'bootstrap' -> 'bootstrap-3.4.1'
symlink with    version 'codemirror-5.59.2' -> 'node_modules/codemirror/'
symlink without version 'codemirror' -> 'codemirror-5.59.2'
symlink with    version 'commander-2.20.3' -> 'node_modules/commander/'
symlink without version 'commander' -> 'commander-2.20.3'
symlink with    version 'katex-0.12.0' -> 'node_modules/katex/dist/'
symlink without version 'katex' -> 'katex-0.12.0'
symlink with    version 'roboto-fontface-0.10.0' -> 'node_modules/roboto-fontface/'
symlink without version 'roboto-fontface' -> 'roboto-fontface-0.10.0'

added 6 packages, and audited 7 packages in 6s

found 0 vulnerabilities
npm WARN deprecated chokidar@1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2"
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! Cannot read property 'stdin' of undefined
npm ERR! code ENOMEM
npm ERR! syscall spawn
npm ERR! errno ENOMEM
npm ERR! spawn ENOMEM

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-03-20T19_36_43_067Z-debug.log
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2"
npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.3: this library is no longer supported
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
npm WARN deprecated @babel/polyfill@7.10.4: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated core-js@2.6.9: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
Connection to [REDACTED] closed by remote host.
Connection to [REDACTED] closed.
williamstein commented 3 years ago

You ran out of memory. Make sure your build machine has at least 4GB of RAM. That's what ENOMEM means:

npm ERR! Cannot read property 'stdin' of undefined

npm ERR! code ENOMEM

npm ERR! syscall spawn

npm ERR! errno ENOMEM

npm ERR! spawn ENOMEM
WP-LKL commented 3 years ago

Thanks for everything @williamstein, got it all working now (although not on an IBM instruction set).

williamstein commented 3 years ago

Enjoy!