Getting Started with SciServer Compute#

In addition to hosting large datasets the SciServer also hosts compute environments to analyze these large datasets for academic use with SciServer Compute. SciServer Compute is “application that allows users to easily create and run Jupyter Notebooks containing code and instructions to analyze and process SciServer hosted data sets.” More details about these compute environments can be found in their documentation. Essentially, these compute environments are docker containers with a limited amount of storage and computational resources that can be created from a provided set of images. Documentation on their provided images can be found here.

Simply put, this provides a cloud computing environment with some preinstalled software (such as Jupyter or R) so that you can jump right into accessing the datasets without having to install anything on your computer.

To use one of these compute environments you can head directly to the SciServer Compute page and click on Create Container. Alternatively, the SciServer provides some of examples to help users get started in their Example Notebooks section. This will direct you to some more detailed steps on creating a container.

Before creating a container, please take a moment to note the information regarding file storage at the bottom of the SciServer Compute page. This make not make perfect sense now, but will become important in the future. Essentially, you will have access to a few different folders in the container but when and how long files will exist may change over time.

SciServer Compute with AstroPath Dataset & astropathdb Access#

  • Create a SciServer account, sign in with it on the AstroPath website and accept the data use agreement as described in Where to Start?

  • navigate to SciServer Compute

  • Click on Create Container.

  • Give the container a unique name and leave the Domain alone

  • Use SciServer Essentials 3.0 as the Compute Image

  • In User Volumes select AstroPathDocumentation

  • Click Create in the lower right hand corner

To activate the container click on it’s name in the drop down table of containers, this should open a new window for the container.

Next, you will need to pip install the package.

  • Open a “Terminal” by clicking on the icon toward the bottom of the “Launcher” window that opens

  • In the terminal add the following as is:

pip install workspace/Storage/bgreen42/AstroPathDocumentation/astropathpy-db/.[sciserver]

This will install the package and may take a few minutes. Once that is finished, You can create a new Jupyter Notebook by clicking the “+” icon at the top of the Jupyter Lab window and selecting Python under Notebook section.

Next, head over to the Examples and Tutorials section of the documentation to see how to run some analyses.

Authentication in Compute#

Inside SciServer Compute, AstroDB uses the managed SciScript token:

from astropathdb import AstroDB

db = AstroDB()

Explicit username, password, and credential_filename arguments, local environment credentials, environment tokens, and credential files are ignored. The managed token has no username and password, so store="keyring" and store="both" raise an error. An unavailable managed token raises a login error; it does not start a local login. Restore the Compute session before retrying. A refused query keeps the existing Compute connection-error behavior.

To share the managed token through the current process environment, log in through the credential manager with store="env":

from astropathdb.db_io.credentials import CredentialManager

CredentialManager(store="env").login()

This exports ASTROPATHDB_TOKEN. Export is process-local, does not write a file, and does not update other notebook kernels or the parent shell. Child processes started afterwards may inherit it. Never log the token or expose it through debugging or process inspection. All instances share the process identity; token reuse does not validate the token with the server. Supplying an existing db_connection bypasses all authentication options. See Logging into SciServer Locally for local login, keyring, and token-sharing workflows.