This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
465 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// See https://aka.ms/devcontainer.json for format details. | ||
{ | ||
"name": "CoCalc Docker", | ||
"image": "sagemathinc/cocalc", | ||
"containerEnv": { | ||
"MAKE": "make -j12" | ||
}, | ||
// Run commands after the container is created. | ||
// libgmp.a is broken and leads to a build failure of ecm. | ||
"postCreateCommand": ".devcontainer/post_create.sh && rm -f /usr/local/sage/local/lib/libgmp.a", | ||
// Run commands after the container is started. | ||
"postStartCommand": "make configure && ./configure --enable-build-as-root --prefix=/usr/local/sage/local --with-sage-venv && make build V=0", | ||
"extensions": [ | ||
"ms-python.python" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// See https://aka.ms/devcontainer.json for format details. | ||
{ | ||
"name": "computop/sage Docker", | ||
"image": "computop/sage", | ||
"containerEnv": { | ||
"MAKE": "make -j12" | ||
}, | ||
// Run commands after the container is created. | ||
// Install build tools, get rid of sourcing /sage/activate in non-login shells. | ||
// libgmp.a is broken and leads to a build failure of ecm. | ||
"postCreateCommand": ".devcontainer/post_create.sh --sudo && sudo rm -f /sage/local/lib/libgmp.a && sed -i.bak '/sage.*activate/d' ~/.bashrc", | ||
// Run commands after the container is started. | ||
// Do not run configure within a sage-env (see #29485). | ||
// The pari package is broken in the computop/sage 9.5 image, need to reinstall. | ||
// Also libnauty is broken. | ||
|
||
"postStartCommand": "make configure && (export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin && unset CFLAGS LDFLAGS CXXFLAGS CPATH LIBRARY_PATH && ./configure --prefix=/sage/local --with-sage-venv) && make pari-clean nauty-clean build V=0", | ||
"extensions": [ | ||
"ms-python.python" | ||
] | ||
} |
12 changes: 12 additions & 0 deletions
12
.devcontainer/downstream-archlinux-latest/devcontainer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// See https://aka.ms/devcontainer.json for format details. | ||
{ | ||
"name": "archlinux:latest downstream Sage", | ||
"image": "archlinux:latest", | ||
// Run commands after the container is created. | ||
"postCreateCommand": "EXTRA_SYSTEM_PACKAGES='sagemath sagemath-doc' EXTRA_SAGE_PACKAGES='notebook pip' .devcontainer/post_create.sh", | ||
// Run commands after the container is started. | ||
"postStartCommand": "make configure && ln -sf /usr venv", | ||
"extensions": [ | ||
"ms-python.python" | ||
] | ||
} |
20 changes: 20 additions & 0 deletions
20
.devcontainer/downstream-conda-forge-latest/devcontainer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// See https://aka.ms/devcontainer.json for format details. | ||
{ | ||
"name": "condaforge/mambaforge:latest downstream Sage", | ||
"image": "condaforge/mambaforge:latest", | ||
// Run commands after the container is created. | ||
"postCreateCommand": "mamba install --yes sage", | ||
// Run commands after the container is started. | ||
// * If the workspace directory looks like a copy of the Sage source tree (SAGE_ROOT): | ||
// - it bootstraps and configures the Sage distribution, | ||
// - thus, the script ``./sage`` and the symlinks ``prefix``, ``venv`` are set as expected, | ||
// - the source tree is prepared for rebuilding Sage based from the source tree on | ||
// top of the existing installation from the Docker image. | ||
// - however, it does not start the build. | ||
// * Otherwise, it does nothing. This is so that users can copy this devcontainer.json file as is | ||
// into their projects. | ||
"postStartCommand": "if [ -d pkgs/sagemath-standard ]; then make configure && ln -sf $CONDA_PREFIX venv; else echo 'Edit .devcontainer/devcontainer.json (postStartCommand) to run project-specific startup commands'; fi", | ||
"extensions": [ | ||
"ms-python.python" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// See https://aka.ms/devcontainer.json for format details. | ||
{ | ||
"name": "CoCalc Docker", | ||
"image": "sagemathinc/cocalc", | ||
"containerEnv": { | ||
"MAKE": "make -j12" | ||
}, | ||
// Run commands after the container is created. | ||
// libgmp.a is broken and leads to a build failure of ecm. | ||
"postCreateCommand": ".devcontainer/post_create.sh && rm -f /usr/local/sage/local/lib/libgmp.a", | ||
// Run commands after the container is started. | ||
// * If the workspace directory looks like a copy of the Sage source tree (SAGE_ROOT): | ||
// - it bootstraps the Sage distribution, | ||
// - sets the symlink ``venv`` as expected, | ||
// * Otherwise, it does nothing. This is so that users can copy this devcontainer.json file as is | ||
// into their projects. | ||
"postStartCommand": "if [ -d pkgs/sagemath-standard ]; then make configure && ./configure --enable-build-as-root --prefix=/usr/local/sage/local --with-sage-venv; else echo 'Edit .devcontainer/devcontainer.json (postStartCommand) to run project-specific startup commands'; fi", | ||
"extensions": [ | ||
"ms-python.python" | ||
] | ||
} |
21 changes: 21 additions & 0 deletions
21
.devcontainer/downstream-docker-computop/devcontainer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// See https://aka.ms/devcontainer.json for format details. | ||
{ | ||
"name": "computop/sage Docker", | ||
"image": "computop/sage", | ||
"containerEnv": { | ||
"MAKE": "make -j12" | ||
}, | ||
// Run commands after the container is created. | ||
// Install build tools, get rid of sourcing /sage/activate in non-login shells. | ||
// libgmp.a is broken and leads to a build failure of ecm. | ||
"postCreateCommand": ".devcontainer/post_create.sh --sudo && sudo rm -f /sage/local/lib/libgmp.a && sed -i.bak '/sage.*activate/d' ~/.bashrc", | ||
// Run commands after the container is started. | ||
// Do not run configure within a sage-env (see #29485). | ||
// The pari package is broken in the computop/sage 9.5 image, need to reinstall. | ||
// Also libnauty is broken. | ||
|
||
"postStartCommand": "make configure && (export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin && unset CFLAGS LDFLAGS CXXFLAGS CPATH LIBRARY_PATH && ./configure --prefix=/sage/local --with-sage-venv)", | ||
"extensions": [ | ||
"ms-python.python" | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
.devcontainer/downstream-docker-sagemath/devcontainer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// See https://aka.ms/devcontainer.json for format details. | ||
{ | ||
"name": "sagemath/sagemath Docker", | ||
"image": "sagemath/sagemath:develop", | ||
// Run commands after the container is created. | ||
// Install build tools. | ||
"postCreateCommand": ".devcontainer/post_create.sh --sudo" | ||
// Run commands after the container is started. | ||
// Do not run configure within a sage-env (see #29485). | ||
"postStartCommand": "if [ -d pkgs/sagemath-standard ]; then ln -sf /home/sage/sage/venv venv && ln -sf /home/sage/sage/local prefix; else echo 'Edit .devcontainer/devcontainer.json (postStartCommand) to run project-specific startup commands'; fi", | ||
"extensions": [ | ||
"ms-python.python" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This Dockerfile is used by all portability-.../devcontainer.json files, | ||
# which provide the actual values for the 4 arguments defined below, which | ||
# feed into the FROM statement that determines the base Docker image. | ||
ARG SYSTEM_FACTOR="ubuntu-jammy" | ||
ARG PACKAGE_FACTOR="standard" | ||
ARG DOCKER_TARGET="with-system-packages" | ||
ARG DOCKER_TAG="dev" | ||
FROM ghcr.io/sagemath/sage/sage-docker-${SYSTEM_FACTOR}-${PACKAGE_FACTOR}-${DOCKER_TARGET}:${DOCKER_TAG} |
23 changes: 23 additions & 0 deletions
23
.devcontainer/portability-centos-7-devtoolset-gcc_11-standard/devcontainer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// See https://aka.ms/devcontainer.json for format details. | ||
{ | ||
"name": "Centos 7", | ||
"build": { | ||
"dockerfile": "portability-Dockerfile", | ||
// See tox.ini for definitions. | ||
"args": { "SYSTEM_FACTOR": "centos-7-devtoolset-gcc_11", | ||
"PACKAGE_FACTOR": "standard", | ||
"DOCKER_TARGET": "with-targets", | ||
"DOCKER_TAG": "dev" | ||
} | ||
}, | ||
"containerEnv": { | ||
"MAKE": "make -j12" | ||
}, | ||
// Run commands after the container is created. | ||
"postCreateCommand": ".devcontainer/post_create.sh", | ||
// Run commands after the container is started. | ||
"postStartCommand": ". /opt/rh/devtoolset-11/enable && .devcontainer/portability-post_start.sh", | ||
"extensions": [ | ||
"ms-python.python" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#! /bin/sh | ||
# The portability-.../devcontainer.json configurations run this script after | ||
# the container is started. | ||
# | ||
# The script assumes that it is run from SAGE_ROOT. | ||
# | ||
# If "config.log" or "logs" are symlinks (for example, created by 'tox -e local-...', | ||
# or after https://trac.sagemath.org/ticket/33262), they might point outside of | ||
# the dev container, so remove them. Likewise for upstream. | ||
for f in config.log logs upstream; do | ||
if [ -L $f ]; then | ||
rm -f $f | ||
fi | ||
done | ||
# If possible (ensured after https://trac.sagemath.org/ticket/33262), keep the | ||
# logs in the container. | ||
if [ ! -d logs ]; then | ||
ln -s /sage/logs logs | ||
fi | ||
# Bootstrap, configure, and build the Sage distribution, reusing the Sage | ||
# installation from the prebuilt image. | ||
set -e | ||
set -x | ||
make configure | ||
if [ -x /sage/config.status ]; then | ||
eval ./configure $(/sage/config.status --config) --enable-build-as-root --prefix=/sage/local --with-sage-venv | ||
else | ||
./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv | ||
fi | ||
make build V=0 |
23 changes: 23 additions & 0 deletions
23
.devcontainer/portability-ubuntu-jammy-standard/devcontainer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// See https://aka.ms/devcontainer.json for format details. | ||
{ | ||
"name": "Ubuntu jammy", | ||
"build": { | ||
"dockerfile": "portability-Dockerfile", | ||
// See tox.ini for definitions | ||
"args": { "SYSTEM_FACTOR": "ubuntu-jammy", | ||
"PACKAGE_FACTOR": "standard", | ||
"DOCKER_TARGET": "with-targets", | ||
"DOCKER_TAG": "dev" | ||
} | ||
}, | ||
"containerEnv": { | ||
"MAKE": "make -j12" | ||
}, | ||
// Run commands after the container is created. | ||
"postCreateCommand": ".devcontainer/post_create.sh", | ||
// Run commands after the container is started. | ||
"postStartCommand": ".devcontainer/portability-post_start.sh", | ||
"extensions": [ | ||
"ms-python.python" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#! /bin/sh | ||
# Run this script from SAGE_ROOT. Invoke with "--sudo" if sudo is needed. | ||
export PATH=$(pwd)/build/bin:$PATH | ||
SYSTEM=$(sage-guess-package-system) | ||
eval $(sage-print-system-package-command $SYSTEM "$@" update) | ||
eval $(sage-print-system-package-command $SYSTEM --yes "$@" --spkg install _prereq python3 git $EXTRA_SAGE_PACKAGES) | ||
if [ -n "$EXTRA_SYSTEM_PACKAGES" ]; then | ||
eval $(sage-print-system-package-command $SYSTEM --yes "$@" install $EXTRA_SYSTEM_PACKAGES) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
jupyter-notebook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python-pip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python-tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.