{"id":17030388,"url":"https://github.com/vsoch/singularity-nbconvert","last_synced_at":"2025-03-22T20:25:30.868Z","repository":{"id":141668003,"uuid":"107667365","full_name":"vsoch/singularity-nbconvert","owner":"vsoch","description":"Singularity container with nbconvert for conversion of jupyter notebooks to other formats","archived":false,"fork":false,"pushed_at":"2017-10-20T12:48:06.000Z","size":182,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T00:22:19.584Z","etag":null,"topics":["jupyter","nbconvert","pdf","singularity","singularity-container"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vsoch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-20T10:55:15.000Z","updated_at":"2020-05-20T02:09:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"9b43f542-ef28-4ff7-afdd-27b6d77937f0","html_url":"https://github.com/vsoch/singularity-nbconvert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fsingularity-nbconvert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fsingularity-nbconvert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fsingularity-nbconvert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fsingularity-nbconvert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vsoch","download_url":"https://codeload.github.com/vsoch/singularity-nbconvert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245016138,"owners_count":20547542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jupyter","nbconvert","pdf","singularity","singularity-container"],"created_at":"2024-10-14T08:06:43.449Z","updated_at":"2025-03-22T20:25:30.845Z","avatar_url":"https://github.com/vsoch.png","language":"Jupyter Notebook","readme":"# Singularity Latex Converter\n\nThis container will help you to convert Jupyter notebooks to html pages.\n\n\n## Usage\nBefore using, make sure you have the latest version of [Singularity](https://singularityware.github.io) installed.\n\n### Pull\n\nThe easiest thing is to pull the container from Singularity Hub where it's already built.\n\n```\nsingularity pull --name latex.simg shub://vsoch/singularity-nbconvert:latex\nProgress |===================================| 100.0% \nDone. Container is at: /tmp/singularity/latex.simg\n```\n\n### Run \nThe container is a file sitting in your present working directory! To convert from Jupyter notebook (extension `.ipynb`) to pdf. It's primary function (called a runscript) is to perform a conversion, and that looks like this:\n\n\n```\nsingularity run latex.simg --to pdf test_notebook.ipynb\n[NbConvertApp] Converting notebook test_notebook.ipynb to pdf\n[NbConvertApp] Support files will be in test_notebook_files/\n[NbConvertApp] Making directory test_notebook_files\n[NbConvertApp] Writing 17358 bytes to notebook.tex\n[NbConvertApp] Building PDF\n[NbConvertApp] Running xelatex 3 times: [u'xelatex', u'notebook.tex']\n[NbConvertApp] Running bibtex 1 time: [u'bibtex', u'notebook']\n[NbConvertApp] WARNING | bibtex had problems, most likely because there were no citations\n[NbConvertApp] PDF successfully created\n[NbConvertApp] Writing 52431 bytes to test_notebook.pdf\n```\n\nThe call above can have any custom arguments that you would give to `jupyter nbconvert`. It doesn't necessarily have to convert to `--pdf`, and you can add other options. E.g., to see help:\n\n\n```\nsingularity run latex --help\n\n```\n\n\n### Exec\nThe above command targets the nbconvert executable directly (via Jupyter), but you can also execute a custom command, the container has all of the dependencies like jupyter, nbconvert, etc. installed. For example, here I am listing the contents of the conda installation bin:\n\n```\nsingularity exec latex ls /opt/conda/bin\n2to3\t\t  infotocap\t\tpip\t\t  tabs\nactivate\t  jsonschema\t\tpydoc\t\t  tclsh\nc_rehash\t  jupyter\t\tpygmentize\t  tclsh8.6\ncaptoinfo\t  jupyter-kernelspec\tpython\t\t  tic\nchardetect\t  jupyter-migrate\tpython-config\t  toe\nclear\t\t  jupyter-nbconvert\tpython2\t\t  tput\nconda\t\t  jupyter-run\t\tpython2-config\t  tset\nconda-env\t  jupyter-troubleshoot\tpython2.7\t  wheel\ndeactivate\t  jupyter-trust\t\tpython2.7-config  wish\neasy_install\t  ncursesw6-config\treset\t\t  wish8.6\neasy_install-2.7  openssl\t\tsmtpd.py\nidle\t\t  pandoc\t\tsqlite3\ninfocmp\t\t  pandoc-citeproc\tsqlite3_analyzer\n```\n\n\n## Development\nDevelopment with Singularity is easiest when you build a \"sandbox,\" which is like building into a folder.\n\n\n```\nsudo singularity build --sandbox latex/ Singularity.latex\n```\n\n### Build\n\nYou can build the image with [Singularity 2.4](https://singularityware.github.io) with the following command:\n\n```\nsudo singularity build --writable latex.simg Singularity.latex\n```\n\nWhen it's time for a \"production\" build (squash fs image):\n\n```\nsudo singularity build latex.simg Singularity.latex\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsoch%2Fsingularity-nbconvert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvsoch%2Fsingularity-nbconvert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsoch%2Fsingularity-nbconvert/lists"}