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

Enhancements on adding GPU workflow #151

Closed arm2arm closed 2 years ago

arm2arm commented 2 years ago

in order to add tensorflow with GPU support to the cocalc we require to rebuild all image from tensorflow/tensorflow-gpu:latest Old way is:

sed -i  "/FROM/c\FROM  tensorflow\/tensorflow:devel-gpu" Dockerfile 

But since docker 17.x tagging is implemented, I am suggesting add following into the Dockerfile:

ARG MYAPP_IMAGE=ubuntu:20.04
FROM $MYAPP_IMAGE

Later on build process in CI looks much nicer :) :

- docker build -t cocalc-gpu --build-arg MYAPP_IMAGE=tensorflow/tensorflow:devel-gpu .
- docker build -t cocalc-gpu -f Dockerfile . | tee -a ../cocalc-compile-job.log
williamstein commented 2 years ago

I agree!