spacetelescope / science-platform-images

Other
4 stars 7 forks source link

Build Roman on Apple Silicon #33

Closed jaytmiller closed 6 months ago

jaytmiller commented 6 months ago

Updates for building Roman development system on Apple Silicon macs.

This PR is related to the following issue but does not directly address the issues presented there:

https://github.com/spacetelescope/science-platform-images/issues/32

In theory I used this Colima setup:

colima start \
--profile intel \
--arch x86_64 \
--cpu 10 \
--disk 200 \
--memory 32 \
--vm-type vz \
--vz-rosetta \
--verbose

Also POSSIBLY IMPORTANT as a work around to failures fetching manifests from DockerHub, I performed my successful laptop build OFF of our VPN.

My setup-env was:

# Clone and customize this for your deployment
#
# NOTE:  must be sourced from jupyterhub-deploy root directory
#

# ----------------- basic inputs,  must set for deployment --------------

export DEPLOYMENT_NAME=roman        # roman, jwebbinar, tike
export ENVIRONMENT=sandbox          # sandbox, dev, test, prod, int
export CAL_VERSION=none             # e.g. roman or jwst x.y.z CAL release, latest, or none

export USE_FROZEN=0                  # use 0 for loosely pinned package versions,
                                     # 1 for tagged production build, 2 for chilly

export FREEZE_CHILL=1                # capture new frozen and chilly requirements as
                                     # modified files in this git repo

export PLATFORM="linux/amd64"        # os / instruction-set for built image: linux/amd64 or linux/aarch64

export REGISTRY=""
# export REGISTRY="quay.io/repository/"    # empty for DockerHub,  but jupyter/docker-stacks is now at quay.io/repository

export OWNER="spacetelescope"          # jupyter or spacetelescope base image repo
# export OWNER="jupyter"          # jupyter or spacetelescope base image repo
# export OWNER="${REGISTRY}/jupyter"          # jupyter or spacetelescope base image repo
                                     # jupyter will be pulled from DockerHub
                                     # spacetelescope will be built from source code

export BASE_IMAGE=${OWNER}/scipy-notebook   # from jupyter/docker-stacks

export NOTEBOOK_TAG=latest
export NOTEBOOK_ID=notebook-${DEPLOYMENT_NAME}:${NOTEBOOK_TAG}  # abstract name of mission-specific notebook image

# ----------------- vvvv less frequently changed vvvv -------------------------------

source infrequent-env   # for image development

This runs fairly well but two import tests fail due to numpy v1/v2 version build issues.

jaytmiller commented 6 months ago

POSSIBLY IMPORTANT as a work around to failures fetching manifests from DockerHub, I performed my successful laptop build OFF of our VPN.