-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
115 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: deploy | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: | ||
- main | ||
- add-data | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
deploy-tsadar: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-1 | ||
|
||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
|
||
- name: Build and tag api request image to Amazon ECR | ||
env: | ||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | ||
ECR_REPOSITORY: continuum | ||
IMAGE_TAG: latest-tsadar-runner | ||
run: | | ||
docker build -f Dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . | ||
- name: Push all images to Amazon ECR | ||
env: | ||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | ||
ECR_REPOSITORY: continuum | ||
run: | | ||
docker push --all-tags $ECR_REGISTRY/$ECR_REPOSITORY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# base image | ||
FROM mambaorg/micromamba:latest | ||
|
||
WORKDIR /app | ||
|
||
COPY --chown=$MAMBA_USER:$MAMBA_USER tsadar /app/tsadar | ||
COPY --chown=$MAMBA_USER:$MAMBA_USER env_gpu.yml docker/fit_for_app.py docker/run.sh /app/ | ||
RUN chmod +x run.sh | ||
|
||
RUN micromamba install -y -n base -f /app/env_gpu.yml && \ | ||
micromamba clean --all --yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import sys | ||
from tsadar.runner import run_for_app | ||
|
||
if __name__ == "__main__": | ||
run_for_app(sys.argv[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
micromamba run -n base python3 fit_for_app.py $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
name: tsadar-gpu | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python=3.10 | ||
- ipython | ||
- ipykernel | ||
- python=3.12 | ||
- pyhdf | ||
- pip | ||
- jax[cuda12] | ||
- jaxopt | ||
- numpy<2 | ||
- scipy | ||
- matplotlib | ||
- pyyaml | ||
- mlflow | ||
- boto3 | ||
- flatten-dict | ||
- typing-extensions | ||
- optax | ||
- tqdm | ||
- xarray | ||
- pandas | ||
- pip: | ||
# works for regular pip packages | ||
- --find-links https://storage.googleapis.com/jax-releases/jax_cuda_releases.html | ||
- jaxlib==0.4.26+cuda12.cudnn89 | ||
- jax==0.4.26 | ||
- jaxopt | ||
- numpy | ||
- scipy | ||
- matplotlib | ||
- pyhdf | ||
- xlrd | ||
- pyyaml | ||
- mlflow | ||
- boto3 | ||
- flatten-dict | ||
- typing-extensions | ||
- optax | ||
- tqdm | ||
- xarray | ||
- mlflow_export_import | ||
- pandas | ||
- interpax | ||
- mlflow_export_import | ||
- interpax | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters