Skip to content

Commit

Permalink
Merge pull request jupyterlab#718 from jupyterlab/apple-silicon-env-s…
Browse files Browse the repository at this point in the history
…upport

bundle Apple silicon python environment for arm64 installer
  • Loading branch information
mbektas authored Oct 25, 2023
2 parents 71ee29c + d0bc461 commit e89227f
Show file tree
Hide file tree
Showing 15 changed files with 889 additions and 248 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ jobs:
strategy:
matrix:
cfg:
- { platform: linux, platform_name: Linux, os: ubuntu-latest, conda_platform: linux-64 }
- { platform: mac, platform_name: macOS, os: macos-latest, conda_platform: osx-64 }
- { platform: win, platform_name: Windows, os: windows-latest, conda_platform: win-64 }
- { platform: linux, platform_name: Linux, os: ubuntu-latest, build_platform: linux-64, conda_platform: linux-64 }
- { platform: osx-64, platform_name: macOS x64, os: macos-latest, build_platform: osx-64, conda_platform: osx-64 }
- { platform: osx-arm64, platform_name: macOS arm64, os: macos-latest, build_platform: osx-64, conda_platform: osx-arm64 }
- { platform: win, platform_name: Windows, os: windows-latest, build_platform: win-64, conda_platform: win-64 }

name: '${{ matrix.cfg.platform_name }} installer'
runs-on: ${{ matrix.cfg.os }}

steps:
- uses: actions/checkout@v4
- uses: s-weigand/setup-conda@v1
- run: conda install --file ./workflow_env/conda-${{ matrix.cfg.conda_platform }}.lock -y
- run: conda install --file ./workflow_env/conda-${{ matrix.cfg.build_platform }}.lock -y

- name: Install node
uses: actions/setup-node@v3
Expand Down Expand Up @@ -72,7 +73,7 @@ jobs:
# contents of tarball needs to be signed for notarization
- name: Codesign Application Server
if: matrix.cfg.platform == 'mac' && steps.release-exists.outputs.result == 'true'
if: (matrix.cfg.platform == 'osx-64' || matrix.cfg.platform == 'osx-arm64') && steps.release-exists.outputs.result == 'true'
env:
CSC_IDENTITY_AUTO_DISCOVERY: true
CSC_FOR_PULL_REQUEST: true
Expand All @@ -91,13 +92,13 @@ jobs:
security import certificate.p12 -k build.keychain -P $CSC_KEY_PASSWORD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $ENV_INSTALLER_KEYCHAIN_PASS build.keychain
echo "Signing env binaries"
while read line; do /usr/bin/codesign --force --options=runtime --deep -s "Developer ID Application" ./env_installer/jlab_server_extracted/"$line" -v; done < ./env_installer/sign-osx-64.txt
while read line; do /usr/bin/codesign --force --options=runtime --deep -s "Developer ID Application" ./env_installer/jlab_server_extracted/"$line" -v; done < ./env_installer/sign-${{ matrix.cfg.platform }}.txt
rm certificate.p12
security delete-keychain build.keychain
# recreate tarball after signing contents
- name: Re-archive Application Server Installer
if: matrix.cfg.platform == 'mac' && steps.release-exists.outputs.result == 'true'
if: (matrix.cfg.platform == 'osx-64' || matrix.cfg.platform == 'osx-arm64') && steps.release-exists.outputs.result == 'true'
run: |
yarn compress_env_installer:${{ matrix.cfg.platform }}
rm -rf ./env_installer/jlab_server_extracted
Expand Down Expand Up @@ -138,15 +139,15 @@ jobs:
dist/JupyterLab.rpm
- name: Upload macOS x64 Installer
if: matrix.cfg.platform == 'mac'
if: matrix.cfg.platform == 'osx-64'
uses: actions/upload-artifact@v3
with:
name: mac-installer-x64
path: |
dist/JupyterLab-x64.dmg
- name: Upload macOS arm64 Installer
if: matrix.cfg.platform == 'mac'
if: matrix.cfg.platform == 'osx-arm64'
uses: actions/upload-artifact@v3
with:
name: mac-installer-arm64
Expand Down Expand Up @@ -182,7 +183,7 @@ jobs:
overwrite: true

- name: Upload macOS x64 Installer as Release asset
if: matrix.cfg.platform == 'mac' && steps.release-exists.outputs.result == 'true'
if: matrix.cfg.platform == 'osx-64' && steps.release-exists.outputs.result == 'true'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.JLAB_APP_TOKEN }}
Expand All @@ -192,7 +193,7 @@ jobs:
overwrite: true

- name: Upload macOS arm64 Installer as Release asset
if: matrix.cfg.platform == 'mac' && steps.release-exists.outputs.result == 'true'
if: matrix.cfg.platform == 'osx-arm64' && steps.release-exists.outputs.result == 'true'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.JLAB_APP_TOKEN }}
Expand All @@ -202,7 +203,7 @@ jobs:
overwrite: true

- name: Upload macOS x64 App as Release asset
if: matrix.cfg.platform == 'mac' && steps.release-exists.outputs.result == 'true'
if: matrix.cfg.platform == 'osx-64' && steps.release-exists.outputs.result == 'true'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.JLAB_APP_TOKEN }}
Expand All @@ -212,7 +213,7 @@ jobs:
overwrite: true

- name: Upload macOS arm64 App as Release asset
if: matrix.cfg.platform == 'mac' && steps.release-exists.outputs.result == 'true'
if: matrix.cfg.platform == 'osx-arm64' && steps.release-exists.outputs.result == 'true'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.JLAB_APP_TOKEN }}
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/sync_lab_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,17 @@ jobs:
if: env.update_available == 'true'
run: yarn update_conda_lock

- name: Update binary sign list
- name: Update binary sign list osx-64
if: env.update_available == 'true'
run: |
yarn clean_env_installer && conda-lock install --prefix ./env_installer/jlab_server ./env_installer/conda-osx-64.lock
yarn update_binary_sign_list
yarn update_binary_sign_list --platform osx-64
- name: Update binary sign list osx-arm64
if: env.update_available == 'true'
run: |
yarn clean_env_installer && conda-lock install --no-validate-platform --prefix ./env_installer/jlab_server ./env_installer/conda-osx-arm64.lock
yarn update_binary_sign_list --platform osx-arm64
- name: Create a PR for the new version
if: env.update_available == 'true'
Expand Down
4 changes: 2 additions & 2 deletions dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

JupyterLab Desktop bundles JupyterLab front-end and a conda environment as JupyterLab Desktop Server as its backend into an Electron application.

`<platform>`: mac, linux or win
`<platform>`: osx-64, osx-arm64, linux or win

- Get the project source code

Expand All @@ -53,7 +53,7 @@ JupyterLab Desktop bundles JupyterLab front-end and a conda environment as Jupyt
yarn create_env_installer:<platform>
```

Installer will be created in one of `env_installer/JupyterLabDesktopAppServer<version>-MacOSX-x86_64.sh`, `env_installer/JupyterLabDesktopAppServer-<version>-Linux-x86_64.sh`, `env_installer/JupyterLabDesktopAppServer-<version>-Windows-x86_64.exe` based on your platform
Installer will be created in `env_installer/jlab_server.tar.gz` and will be available for use in `env_installer/jlab_server`.

- Now you can launch the JupyterLab Desktop locally using:

Expand Down
24 changes: 12 additions & 12 deletions env_installer/conda-linux-64.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by conda-lock.
# platform: linux-64
# input_hash: 1d96d705544ff2719a46dc4e3a99560373fe4319085d2013ee1accdcae6969d9
# input_hash: b37e10501f46c086d1ff7adb5b89d8516df21a6b47f55a755f44cb85c0496156
@EXPLICIT
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81
https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2023.7.22-hbcca054_0.conda#a73ecd2988327ad4c8f2c331482917f2
Expand All @@ -17,7 +17,7 @@ https://conda.anaconda.org/conda-forge/linux-64/libdeflate-1.19-hd590300_0.conda
https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.2-h7f98852_5.tar.bz2#d645c6d2ac96843a2bfaccd2d62b3ac3
https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-13.2.0-ha4646dd_2.conda#78fdab09d9138851dde2b5fe2a11019e
https://conda.anaconda.org/conda-forge/linux-64/libjpeg-turbo-3.0.0-hd590300_1.conda#ea25936bb4080d843790b586850f82b8
https://conda.anaconda.org/conda-forge/linux-64/libnsl-2.0.0-hd590300_1.conda#854e3e1623b39777140f199c5f9ab952
https://conda.anaconda.org/conda-forge/linux-64/libnsl-2.0.1-hd590300_0.conda#30fd6e37fe21f86f4bd26d6ee73eeec7
https://conda.anaconda.org/conda-forge/linux-64/libsodium-1.0.18-h36c2ea0_1.tar.bz2#c3788462a6fbddafdb413a9f9053e58d
https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda#40b61aab5c7ba9ff276c41cfffe6b80b
https://conda.anaconda.org/conda-forge/linux-64/libwebp-base-1.3.2-hd590300_0.conda#30de3fd9b3b602f7473f30e684eeea8c
Expand Down Expand Up @@ -52,7 +52,7 @@ https://conda.anaconda.org/conda-forge/linux-64/brotli-1.1.0-hd590300_1.conda#f2
https://conda.anaconda.org/conda-forge/linux-64/brotli-python-1.1.0-py38h17151c0_1.conda#7a5a699c8992fc51ef25e980f4502c2a
https://conda.anaconda.org/conda-forge/noarch/cached_property-1.5.2-pyha770c72_1.tar.bz2#576d629e47797577ab0f1b351297ef4a
https://conda.anaconda.org/conda-forge/noarch/certifi-2023.7.22-pyhd8ed1ab_0.conda#7f3dbc9179b4dde7da98dfb151d0ad22
https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.3.0-pyhd8ed1ab_0.conda#fef8ef5f0a54546b9efee39468229917
https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.3.1-pyhd8ed1ab_0.conda#985378f74689fccce52f158027bd9acd
https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_0.tar.bz2#3faab06a954c2a04039983f2c4a50d99
https://conda.anaconda.org/conda-forge/noarch/cycler-0.12.1-pyhd8ed1ab_0.conda#5cd86562580f274031ede6aa6aa24441
https://conda.anaconda.org/conda-forge/linux-64/debugpy-1.8.0-py38h17151c0_1.conda#b43385ccbd4fa88f2c195ad3c4101c77
Expand All @@ -68,7 +68,7 @@ https://conda.anaconda.org/conda-forge/linux-64/jsonpointer-2.4-py38h578d9bd_3.c
https://conda.anaconda.org/conda-forge/noarch/jupyterlab_widgets-3.0.9-pyhd8ed1ab_0.conda#8370e0a9dc443f9b45a23fd30e7a6b3b
https://conda.anaconda.org/conda-forge/linux-64/kiwisolver-1.4.5-py38h7f3f72f_1.conda#b66dcd4f710628fc5563ad56f02ca89b
https://conda.anaconda.org/conda-forge/linux-64/lcms2-2.15-hb7c19ff_3.conda#e96637dd92c5f340215c753a5c9a22d7
https://conda.anaconda.org/conda-forge/linux-64/libblas-3.9.0-18_linux64_openblas.conda#bcddbb497582ece559465b9cd11042e7
https://conda.anaconda.org/conda-forge/linux-64/libblas-3.9.0-19_linux64_openblas.conda#420f4e9be59d0dc9133a0f43f7bab3f3
https://conda.anaconda.org/conda-forge/linux-64/markupsafe-2.1.3-py38h01eb140_1.conda#2dabf287937cd631e292096cc6d0867e
https://conda.anaconda.org/conda-forge/noarch/mistune-3.0.1-pyhd8ed1ab_0.conda#1dad8397c94e4de97a70de552a7dcf49
https://conda.anaconda.org/conda-forge/noarch/munkres-1.1.4-pyh9f0ad1d_0.tar.bz2#2ba8498c1018c1e9c61eb99b973dfe19
Expand Down Expand Up @@ -134,22 +134,22 @@ https://conda.anaconda.org/conda-forge/noarch/jedi-0.19.1-pyhd8ed1ab_0.conda#81a
https://conda.anaconda.org/conda-forge/noarch/jinja2-3.1.2-pyhd8ed1ab_1.tar.bz2#c8490ed5c70966d232fdd389d0dbed37
https://conda.anaconda.org/conda-forge/noarch/jsonpatch-1.33-pyhd8ed1ab_0.conda#bfdb7c5c6ad1077c82a69a8642c87aff
https://conda.anaconda.org/conda-forge/noarch/jupyterlab_pygments-0.2.2-pyhd8ed1ab_0.tar.bz2#243f63592c8e449f40cd42eb5cf32f40
https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-18_linux64_openblas.conda#93dd9ab275ad888ed8113953769af78c
https://conda.anaconda.org/conda-forge/linux-64/liblapack-3.9.0-18_linux64_openblas.conda#a1244707531e5b143c420c70573c8ec5
https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-19_linux64_openblas.conda#d12374af44575413fbbd4a217d46ea33
https://conda.anaconda.org/conda-forge/linux-64/liblapack-3.9.0-19_linux64_openblas.conda#9f100edf65436e3eabc2a51fc00b2c37
https://conda.anaconda.org/conda-forge/noarch/matplotlib-inline-0.1.6-pyhd8ed1ab_0.tar.bz2#b21613793fcc81d944c76c9f2864a7de
https://conda.anaconda.org/conda-forge/noarch/overrides-7.4.0-pyhd8ed1ab_0.conda#4625b7b01d7f4ac9c96300a5515acfaa
https://conda.anaconda.org/conda-forge/noarch/pexpect-4.8.0-pyh1a96a4e_2.tar.bz2#330448ce4403cc74990ac07c555942a1
https://conda.anaconda.org/conda-forge/linux-64/pillow-10.0.1-py38ha43c96d_2.conda#32997918a7dd4e59522deef5d0acf416
https://conda.anaconda.org/conda-forge/noarch/pip-23.2.1-pyhd8ed1ab_0.conda#e2783aa3f9235225eec92f9081c5b801
https://conda.anaconda.org/conda-forge/linux-64/pillow-10.1.0-py38ha43c96d_0.conda#67ca17c651f86159a3b8ed1132d97c12
https://conda.anaconda.org/conda-forge/noarch/pip-23.3.1-pyhd8ed1ab_0.conda#2400c0b86889f43aa52067161e1fb108
https://conda.anaconda.org/conda-forge/noarch/python-dateutil-2.8.2-pyhd8ed1ab_0.tar.bz2#dd999d1cc9f79e67dbb855c8924c7984
https://conda.anaconda.org/conda-forge/noarch/referencing-0.30.2-pyhd8ed1ab_0.conda#a33161b983172ba6ef69d5fc850650cd
https://conda.anaconda.org/conda-forge/noarch/rfc3339-validator-0.1.4-pyhd8ed1ab_0.tar.bz2#fed45fc5ea0813240707998abe49f520
https://conda.anaconda.org/conda-forge/linux-64/ruamel.yaml-0.17.35-py38h01eb140_0.conda#36887eb1d27b72e4fdc62845863e75ff
https://conda.anaconda.org/conda-forge/linux-64/ruamel.yaml-0.17.39-py38h01eb140_0.conda#eb826a1cb9da8b1518667dc6e2ce87cb
https://conda.anaconda.org/conda-forge/noarch/terminado-0.17.1-pyh41d4057_0.conda#3788984d535770cad699efaeb6cb3037
https://conda.anaconda.org/conda-forge/noarch/tinycss2-1.2.1-pyhd8ed1ab_0.tar.bz2#7234c9eefff659501cd2fe0d2ede4d48
https://conda.anaconda.org/conda-forge/noarch/tqdm-4.66.1-pyhd8ed1ab_0.conda#03c97908b976498dcae97eb4e4f3149c
https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.8.0-hd8ed1ab_0.conda#384462e63262a527bda564fa2d9126c0
https://conda.anaconda.org/conda-forge/noarch/urllib3-2.0.6-pyhd8ed1ab_0.conda#d5f8944ff9ab24a292511c83dce33dea
https://conda.anaconda.org/conda-forge/noarch/urllib3-2.0.7-pyhd8ed1ab_0.conda#270e71c14d37074b1d066ee21cf0c4a6
https://conda.anaconda.org/conda-forge/linux-64/argon2-cffi-bindings-21.2.0-py38h01eb140_4.conda#234c813c9d745d4bfc6a2a40514d88a6
https://conda.anaconda.org/conda-forge/noarch/arrow-1.3.0-pyhd8ed1ab_0.conda#b77d8c2313158e6e461ca0efb1c2c508
https://conda.anaconda.org/conda-forge/linux-64/cryptography-41.0.4-py38hcdda232_0.conda#1dbd2442c9a9b93a0771b4e785130aec
Expand Down Expand Up @@ -183,13 +183,13 @@ https://conda.anaconda.org/conda-forge/noarch/prompt_toolkit-3.0.39-hd8ed1ab_0.c
https://conda.anaconda.org/conda-forge/linux-64/scipy-1.10.1-py38h59b608b_3.conda#2f2a57462fcfbc67dfdbb0de6f7484c2
https://conda.anaconda.org/conda-forge/linux-64/conda-23.9.0-py38h578d9bd_0.conda#167822e1937f831ce62828fa6ba403c2
https://conda.anaconda.org/conda-forge/noarch/ipython-8.12.0-pyh41d4057_0.conda#e89d0c5836e45f9e6a66c5c24fc9ef35
https://conda.anaconda.org/conda-forge/noarch/jupyter_events-0.7.0-pyhd8ed1ab_2.conda#088f0493279a7f7eebd514df47d65851
https://conda.anaconda.org/conda-forge/noarch/jupyter_events-0.8.0-pyhd8ed1ab_0.conda#04272d87d3e06c2e26af5e2d4b0e0ad8
https://conda.anaconda.org/conda-forge/noarch/nbclient-0.8.0-pyhd8ed1ab_0.conda#e78da91cf428faaf05701ce8cc8f2f9b
https://conda.anaconda.org/conda-forge/noarch/ipykernel-6.25.2-pyh2140261_0.conda#226f2032ec491cc6e9ce66072660e4f6
https://conda.anaconda.org/conda-forge/noarch/ipywidgets-8.1.1-pyhd8ed1ab_0.conda#2605fae5ee27100e5f10037baebf4d41
https://conda.anaconda.org/conda-forge/noarch/nbconvert-core-7.9.2-pyhd8ed1ab_0.conda#01e4314c780ca73759c694ce3ece281f
https://conda.anaconda.org/conda-forge/noarch/ipympl-0.9.3-pyhd8ed1ab_0.conda#da113e1ecd782afd5ed2f7b5187aaea8
https://conda.anaconda.org/conda-forge/noarch/jupyter_server-2.7.3-pyhd8ed1ab_1.conda#0123f934221b023ddc7443e85cac9023
https://conda.anaconda.org/conda-forge/noarch/jupyter_server-2.8.0-pyhd8ed1ab_0.conda#a750b082b9319e96556df4ee6023b068
https://conda.anaconda.org/conda-forge/noarch/jupyter-lsp-2.2.0-pyhd8ed1ab_0.conda#38589f4104d11f2a59ff01a9f4e3bfb3
https://conda.anaconda.org/conda-forge/noarch/jupyterlab_server-2.25.0-pyhd8ed1ab_0.conda#a52834fa7e3d12abc5efdf06b2097a05
https://conda.anaconda.org/conda-forge/noarch/notebook-shim-0.2.3-pyhd8ed1ab_0.conda#67e0fe74c156267d9159e9133df7fd37
Expand Down
Loading

0 comments on commit e89227f

Please sign in to comment.