Skip to content

Commit 8af45d6

Browse files
author
wikiselev
committed
first commit
0 parents  commit 8af45d6

File tree

37 files changed

+5417
-0
lines changed

37 files changed

+5417
-0
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Docker Deploy to AWS ECR Public
2+
3+
on:
4+
push:
5+
# branches: [ dev ]
6+
branches: [ '**' ] # This will match all branches
7+
paths:
8+
- 'Dockerfile'
9+
- 'requirements.txt'
10+
workflow_dispatch: # This enables manual triggering
11+
inputs:
12+
version:
13+
description: 'Override version tag (optional)'
14+
required: false
15+
default: ''
16+
17+
env:
18+
REPO: 'artemis-paper'
19+
20+
jobs:
21+
build-and-push:
22+
runs-on: ubuntu-latest
23+
permissions:
24+
id-token: write
25+
contents: read
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v3
30+
with:
31+
fetch-depth: 0 # Fetch all history for tags and branches
32+
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v2
35+
36+
- name: Set dynamic version
37+
id: version
38+
run: |
39+
# If this is a tag push, use the tag name without the 'v' prefix
40+
if [[ $GITHUB_REF == refs/tags/* ]]; then
41+
TAG=${GITHUB_REF#refs/tags/v}
42+
echo "VERSION=${TAG}" >> $GITHUB_OUTPUT
43+
echo "Using tag: ${TAG}"
44+
else
45+
# Otherwise use short SHA
46+
SHORT_SHA=$(git rev-parse --short HEAD)
47+
echo "VERSION=${SHORT_SHA}" >> $GITHUB_OUTPUT
48+
echo "Using commit SHA: ${SHORT_SHA}"
49+
fi
50+
51+
- name: Debug OIDC Token
52+
run: |
53+
echo "GitHub Repository: $GITHUB_REPOSITORY"
54+
echo "GitHub Ref: $GITHUB_REF"
55+
echo "GitHub Actor: $GITHUB_ACTOR"
56+
57+
- name: Configure AWS credentials
58+
uses: aws-actions/configure-aws-credentials@v4
59+
with:
60+
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
61+
aws-region: us-east-1 # ECR Public requires us-east-1
62+
role-session-name: GitHubActions-${{ github.run_id }}
63+
role-duration-seconds: 3600
64+
65+
- name: Login to Amazon ECR
66+
id: login-ecr
67+
uses: aws-actions/amazon-ecr-login@v2
68+
with:
69+
registry-type: public
70+
71+
- name: Build and push Docker image
72+
env:
73+
PUBLIC_URI: ${{ steps.login-ecr.outputs.registry }}/alethiotx
74+
VERSION: ${{ steps.version.outputs.VERSION }}
75+
run: |
76+
echo "Building version: ${VERSION}"
77+
78+
# Build and push the Docker image
79+
docker build \
80+
--platform linux/amd64 \
81+
-t ${PUBLIC_URI}/${REPO}:${VERSION} \
82+
-t ${PUBLIC_URI}/${REPO}:latest \
83+
--push \
84+
-f Dockerfile .

.gitignore

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Jupyter
2+
*ipynb_checkpoints
3+
*.ipynb_checkpoints/
4+
5+
# Terraform
6+
**.terraform**
7+
*.tfstate
8+
*.tfstate.*
9+
*.tfvars
10+
.terraform.lock.hcl
11+
backend.hcl
12+
13+
# Nextflow
14+
**.nextflow**
15+
**.nextflow.log**
16+
work/
17+
.nextflow/
18+
19+
# Python
20+
.venv/
21+
venv/
22+
__pycache__/
23+
*.py[cod]
24+
*$py.class
25+
*.egg-info/
26+
dist/
27+
build/
28+
29+
# IDE
30+
.vscode/
31+
.idea/
32+
*.swp
33+
*.swo
34+
*~
35+
36+
# Output directories
37+
results/
38+
output/
39+
plots/
40+
data/local/
41+
42+
# Local testing
43+
test/
44+
for_ed/
45+
check/
46+
targets/
47+
48+
# Documentation build
49+
docs/_build/
50+
docs/.doctrees/
51+
52+
# OS
53+
.DS_Store
54+
Thumbs.db
55+
56+
# Credentials (extra safety)
57+
*.pem
58+
*.key
59+
credentials
60+
secrets.yml

Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM ubuntu:25.10
2+
3+
# Install dependencies
4+
RUN apt-get update && apt-get install -y \
5+
python3-dev \
6+
gcc \
7+
python3-venv
8+
9+
RUN apt-get clean
10+
RUN rm -rf /var/lib/apt/lists/*
11+
12+
COPY requirements.txt .
13+
14+
# Install packages with CodeArtifact as additional index
15+
RUN python3 -m venv artemis
16+
RUN artemis/bin/pip3 install --no-cache-dir \
17+
-r requirements.txt
18+
19+
RUN find . -name "__pycache__" -type d -exec rm -rf {} +
20+
RUN rm -rf *.egg-info
21+
22+
# Activate the virtual environment by default
23+
ENV PATH="/artemis/bin:$PATH"

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Alethio Therapeutics
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)