Skip to content

Dockerfile for a Jupyter notebook environment using hugetim/nbstata

Notifications You must be signed in to change notification settings

ideabucket/docker-jupyter-pystata_kernel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A Docker compose project to stand up a Jupyter notebook server with nbstata, so you can use Jupyter as a first-class UI for Stata.

pystata, on which nbstata depends, comes with Stata 17+. Older versions of Stata will not work.

You need a Stata licence

The image expects you to supply it with a valid stata.lic file. Get this from your local install of Stata, or from your IT department.

Put a copy of it in the same directory as docker-compose.yml, or override the file key for the stata_lic secret to tell Docker where it is.

If you are on Linux, your license file is probably at /usr/local/stata/stata.lic. On Macs it is at /Applications/Stata/stata.lic. I have no idea where it lives on Windows, but probably in the same place as the Stata exe file.

Quickstart

$ docker compose up

Everything should Just Work. Caution: the build process will download several gigabytes of data, because Stata installs are big. As much of this is cached (using Docker cache-mounts) as possible.

If you are on an M1 Mac, the image will run under Rosetta, because there is no AArch64 build of Stata for Linux.

Customisation, etc.

Rename docker-compose.override.sample.yml to docker-compose.override.yml and anything you set in it will override the base config. (See the Compose documentation for more information.)

The comments explain what you can override. In particular you will probably want to override stata_edition if your licence can accommodate it.

Acknowledgements

About

Dockerfile for a Jupyter notebook environment using hugetim/nbstata

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published