{"id":1497,"date":"2024-07-16T13:47:01","date_gmt":"2024-07-16T11:47:01","guid":{"rendered":"https:\/\/wpethzprd.ethz.ch\/isgdmath\/?p=1497"},"modified":"2024-07-16T15:09:50","modified_gmt":"2024-07-16T13:09:50","slug":"sagemath","status":"publish","type":"post","link":"https:\/\/blogs.ethz.ch\/isgdmath\/sagemath\/","title":{"rendered":"Sagemath"},"content":{"rendered":"\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/hub.docker.com\/r\/sagemath\/sagemath\/\">https:\/\/hub.docker.com\/r\/sagemath\/sagemath\/<\/a><\/li>\n<\/ul>\n\n\n\n<p>Since Fedora 39 <a href=\"https:\/\/www.sagemath.org\/\">sagemath<\/a> is not included as a package anymore. There are several possibilities you can use sagemath on Fedora, let&#8217;s highlight two:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Using the offical docker image<\/li>\n\n\n\n<li>Installing it with conda<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Podman<\/h2>\n\n\n\n<h5 class=\"wp-block-heading\">sagemath commandline<\/h5>\n\n\n\n<p>As our installation provides a fully configured rootless podman configuration, you can for example use the following commands to run the sagemath image:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># connect to a central client\nssh ada-X\n# start tmux, alternativly you can use screen\ntmux\n# create a .sage folder\nmkdir $HOME\/.sage\n\n# run sage with your home mounted to \/home\/sage\/mydata and a mounted .sage\npodman run --user 0 -ti -v $HOME\/.sage:\/home\/sage\/.sage -v $HOME:\/home\/sage\/mydata sagemath\/sagemath:latest\n\n# to detach from the tmux session use the following keystrokes\n#CTRL+B then D<\/code><\/pre>\n\n\n\n<p>To add a additional folder you can put a other <code>-v<\/code> parameter, for example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-v \/userdata\/username:\/home\/sage\/mydata2<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">sagemath jupyter notebook<\/h5>\n\n\n\n<p>When you want to use the sage jupyter notebook, you can do the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># connect to a central client\nssh ada-X\n# start tmux, alternativly you can use screen\ntmux\n# create a .sage folder\nmkdir $HOME\/.sage\n\n# run sage jupyter on port 8888\npodman run --user 0 -p 8888:8888 -v $HOME\/.sage:\/home\/sage\/.sage -v $HOME:\/home\/sage\/mydata sagemath\/sagemath:latest sage-jupyter --allow-root\n\n# to detach from the tmux session use the following keystrokes\n#CTRL+B then D<\/code><\/pre>\n\n\n\n<p>Then open a second terminal on your local machine and open ssh tunnel to the ada:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># port forward from to ada-X\nssh -t username@ada-X -L 8888:localhost:8888\n\n# Open webbrowser using the url with token shown in the output.<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Conda<\/h2>\n\n\n\n<p>Please follow the official installation instruction:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/doc.sagemath.org\/html\/en\/installation\/conda.html#install-from-conda-forge\">https:\/\/doc.sagemath.org\/html\/en\/installation\/conda.html#install-from-conda-forge<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Since Fedora 39 sagemath is not included as a package anymore. There are several possibilities you can use sagemath on Fedora, let&#8217;s highlight two: Podman sagemath commandline As our installation provides a fully configured rootless podman configuration, you can for example use the following commands to run the sagemath image: To add a additional folder [&hellip;]<\/p>\n","protected":false},"author":43853,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[198216,759],"tags":[198244,198242,198243],"class_list":["post-1497","post","type-post","status-publish","format-standard","hentry","category-computing","category-linux","tag-compute-client","tag-sage","tag-sagemath"],"_links":{"self":[{"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/posts\/1497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/users\/43853"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/comments?post=1497"}],"version-history":[{"count":0,"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/posts\/1497\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/media?parent=1497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/categories?post=1497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ethz.ch\/isgdmath\/wp-json\/wp\/v2\/tags?post=1497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}