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.

Note

  • 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.

  • Interactions GUI sessions are done via the Custom noVNC Image application in Open On Demand (OOD).

  • You can find out more about OOD here: Compute Quick Start.

  • There are three fields beyond the basics that will need information specific to this image.
    • Mounts

    • Environment Variables

    • Docker Image

Mounts

  • You need to include the following in your Mounts field in addition to your other inputs.

/storage1/fs1/${STORAGE_ALLOCATION}/Active/Stata_License:/opt/stata

Environment Variables

  • This information should be space separated in the field.

PASSWORD=password PATH=/app/stata:$PATH
  • Optional variables
    • GUI display size. This can be changed with the following variables.
      • Width default: 1024

      • Height default: 768

    DISPLAY_WIDTH=<width> DISPLAY_HEIGHT=<height>
    

Docker Image

ghcr.io/washu-it-ris/stata:18
  • Fill out the rest of the fields with the appropriate information (explained in the quick start).

  • Launch the job through the methods described in the quick start.

  • Open Stata by entering the version of Stata you are licensed to use into the GUI terminal.
../../../../_images/stata-success.png

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