-
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.
Merge pull request #11 from developmentseed/feat/docker-build
Add Dockerfile & push images to GHCR
- Loading branch information
Showing
5 changed files
with
75 additions
and
20 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,36 @@ | ||
name: Build Docker Image and Push to GHCR | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- feat/docker-build | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
tags: | | ||
ghcr.io/developmentseed/llllm:latest | ||
ghcr.io/developmentseed/llllm:${{ github.sha }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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,20 @@ | ||
FROM mambaorg/micromamba:1.4-bullseye-slim | ||
|
||
USER root | ||
RUN apt update && apt install -y gcc python3-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
USER $MAMBA_USER | ||
|
||
COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yaml /tmp/env.yaml | ||
# TODO: avoid installing development dependencies | ||
RUN micromamba env create --yes -f /tmp/env.yaml && \ | ||
micromamba clean --all --yes | ||
|
||
EXPOSE 8501 | ||
|
||
COPY . /app | ||
WORKDIR /app | ||
|
||
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health | ||
|
||
ENTRYPOINT ["/opt/conda/envs/llllm-env/bin/streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] |
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