Stata Quick Start

Compute Resources

Docker Usage

Image Details

Requirements for Usage in RIS

  • Use of this software requires a valid Stata license.

    • The license will be in the form of a license file named stata.lic. This file can also be generated from the “License and Activation Key” form Stata provides. Please see the appropriate section for more information.

    • It is recommended to store the license in your storage allocation. (e.g. /storage1/ fs1/${STORAGE_ALLOCATION}/Active/Stata_License). Please do not store any other files in the folder containing the Stata license.

Interactive GUI Session

Please use the following commands to submit an interactive GUI session for Stata.

  • Complete export PASSWORD= with that of your choosing. Do not leave this blank.

  • Replace the example Stata license folder path (/storage1/fs1/${STORAGE_ALLOCATION}/Active/ Stata_License) with the path to the folder containing your Stata license.

export PASSWORD=password
export LSF_DOCKER_PORTS='8080:8080'
export PATH=/app/stata:$PATH
export LSF_DOCKER_VOLUMES="/storage1/fs1/${STORAGE_ALLOCATION}/Active/Stata_License:/opt/stata"
bsub -Is -R 'select[port8080=1]' -q general-interactive -a 'docker(ghcr.io/washu-it-ris/stata:18)' supervisord -c /app/supervisord.conf
  • Since LSF is running interactively, it will output the name of the host it’s running on in the terminal.

  • The host will be the IP address needed to access the VNC.

  • For example: <<Starting on compute1-exec-187.ris.wustl.edu>> translates to the IP being https://compute1-exec-187.compute.ris.wustl.edu:8080/vnc.html

  • The password will be what was set above with the export PASSWORD= command.

  • Please see our documentation for more information on selecting a port.

  • Open Stata by entering the version of Stata you are licensed to use into the GUI terminal.

GUI Session Variables

  • You can change the GUI display size by clicking on the settings icon on the left of the browser and selecting ‘Local Scaling’ from the Scaling Mode dropdown. Click the settings icon again to resume the session.

  • The display height and width can also be changed by passing them as variables.

export DISPLAY_WIDTH=<width> (default is 1024)
export DISPLAY_HEIGHT=<height> (default is 768)

Interactive Command-Line Session

  • If you wish to use Stata in an interactive command-line session, you can do so with the following commands. Please see this note with information on mounting a folder containing your Stata license.

export PATH=/app/stata:$PATH
export LSF_DOCKER_VOLUMES="/storage1/fs1/${STORAGE_ALLOCATION}/Active/Stata_License:/opt/stata"
bsub -Is -q general-interactive -a 'docker(ghcr.io/washu-it-ris/stata:18)' /bin/bash

Generating a Stata License File

If you do not have a Stata License file (stata.lic), you can generate the license using the “License and Activation Key” form provided by Stata after license purchase.

  1. Obtain Serial Number, Code and Authorization from Stata via a license purchase.

  2. Submit a Stata interactive command-line session.

  3. Navigate to the Stata application folder

cd /app/stata
  1. Run the Stata license generator

./stinit
  1. Fill out the information requested by the license generator, including the Serial Number, Code and Authorization in the document provided by Stata after license purchase.

  2. The stata.lic is now generated and available in the /app/stata folder. To avoid having to repeat this process, copy the license to a secure location, such as a storage allocation. The secured license file can then be used in subsequent interactive Stata jobs. Please see the note above for more information.

Multiple Stata Licenses

If you are licensed to use more than one version of Stata supported by RIS, then it is important to mount the folder containing the license pertaining to the version of Stata you will be using.

A suggestion would be to create a folder in your storage allocation for each supported version of Stata you are licensed to use. Name the folder after the version of Stata and copy the corresponding license to the folder. As recommended earlier, please be sure that no other files are in the folder containing the Stata license.

An example folder containing the Stata 18 license would be /storage1/fs1/${STORAGE_ALLOCATION}/Active/Stata18_License/.

Earlier Versions

Earlier versions are still available but no longer directly supported by RIS. Please refer to the latest version for direct support.

  • ghcr.io/washu-it-ris/stata
    • 17

  • gcr.io/ris-registry-shared/stata
    • 17, latest

    • 16