sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.43k stars 479 forks source link

Fix README of Docker images to explain what is needed to install optional packages #31101

Open ebb17fbe-bb21-4240-a908-7f3489db60e4 opened 3 years ago

ebb17fbe-bb21-4240-a908-7f3489db60e4 commented 3 years ago

https://hub.docker.com/r/sagemath/sagemath/ shows instructions that seem to come from docker/README.md. They need updating.

Original report:

According to this answer on Ask SageMath, starting from Sage 9.2 beta ll, we can jupyterlab using:

sage -i jupyterlab_widgets

Running this command on SageMath 9.3.beta4 gives:

make: *** No rule to make target 'all-toolchain'.  Stop.

Steps to reproduce:

docker run -it sagemath/sagemath:develop bash

sudo apt update && \
    sudo apt install -y build-essential

sage -i jupyterlab_widgets

Also see:

CC: @fchapoton @saraedum @slel @seblabbe @dimpase @egourgoulhon @NathanDunfield

Component: docker

Issue created by migration from https://trac.sagemath.org/ticket/31101

mkoeppe commented 3 years ago
comment:1

This is not specific to jupyterlab_widgets.

$ sage -i normaliz
make: *** No rule to make target 'all-toolchain'.  Stop.

Whatever this docker image is prepared for, installing optional packages does not seem part of it.

$ ls -l sage
total 180
-rw-r--r-- 1 sage sage 66461 Dec 15 05:51 COPYING.txt
-rw-r--r-- 1 sage sage    53 Dec 15 05:51 VERSION.txt
drwxr-xr-x 7 sage sage  4096 Dec 15 05:51 build
-rwxr-xr-x 1 sage sage 86258 Dec 15 07:06 config.status
drwxr-xr-x 1 sage sage  4096 Dec 15 07:06 local
-rwxr-xr-x 1 sage sage  4951 Dec 15 05:51 sage
drwxr-xr-x 5 sage sage  4096 Dec 15 07:07 src

One notes that the top-level Makefile (and many other files) are missing. So no build operations are possible.

mkoeppe commented 3 years ago
comment:4

Also sagemath/sagemath-dev:latest appears to be Sage 9.0

mkoeppe commented 3 years ago

Description changed:

--- 
+++ 
@@ -26,3 +26,7 @@
 sage -i jupyterlab_widgets

+Also see: +- https://groups.google.com/g/sage-devel/c/Dbd4nFi8R7I + +

egourgoulhon commented 3 years ago
comment:7

Replying to @mkoeppe:

Also sagemath/sagemath-dev:latest appears to be Sage 9.0

Probably sagemath/sagemath:develop should be used instead (it was updated 2 days ago).

mkoeppe commented 3 years ago

Description changed:

--- 
+++ 
@@ -1,3 +1,8 @@
+https://hub.docker.com/r/sagemath/sagemath/ shows instructions that seem to come from `docker/README.md`. They need updating.
+
+
+Original report:
+
 According to this [answer](https://ask.sagemath.org/question/50194/interact-in-jupyterlab-vs-jupyter/) on Ask [SageMath](../wiki/SageMath), starting from Sage 9.2 beta ll, we can jupyterlab using:
saraedum commented 3 years ago
comment:9

I think that there's no :latest image due to a typo in 83acd7b0916e66fda4d0998132e69e441fb6c328. It's fixed already in develop.

Also sagemath/sagemath-dev:latest appears to be Sage 9.0

Probably sagemath/sagemath:develop should be used instead (it was updated 2 days ago).

These are quite different. The former is a build from a released stable version of SageMath (latest=master) in a version that allows to rebuild SageMath. The latter is a build from the latest beta but without such tooling, i.e., only with the very basics to run SageMath.

saraedum commented 3 years ago
comment:10

I am not sure I understand what this ticket is about. The dockerhub page does not seem to mention that you should sage -i to install packages. You should be able pip install packages though. And we might want to clarify this there.

It should be quite easy to make sage -i work for some packages in the sagemath docker image, see #27288 comment:11. I guess all one needs to do is create a new target in Makefile that is a tiny bit bigger than micro_release and makes the Makefile itself and the most important bits survive.

mkoeppe commented 3 years ago

Description changed:

--- 
+++ 
@@ -34,4 +34,5 @@
 Also see:
 - https://groups.google.com/g/sage-devel/c/Dbd4nFi8R7I

+- https://groups.google.com/g/sage-devel/c/alkG4veIsBk/m/lXYBq-vQAQAJ
mkoeppe commented 3 years ago
comment:12

Moving to 9.4, as 9.3 has been released.

saraedum commented 2 years ago
comment:16

So, what should actually happen here? Or is this a duplicate of #27288?

saraedum commented 2 years ago
comment:17

So, what should actually happen here? Or is this a duplicate of