-
Notifications
You must be signed in to change notification settings - Fork 549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Docker image] Nightly build of docker image #2229
Changes from 14 commits
069727d
6b4ac54
06cf17f
394794f
a2cf2ef
2630f3a
47d1bc4
4e7b7b3
8863014
6eca4ed
c17cc0c
5a5dfa4
4d82507
40ca1cf
f5031cb
f29a506
1e390a3
8840e34
f0132a2
fa8d932
02fd870
53f96d4
3a61ecd
107a5b9
6b96003
d7b9896
0ede04d
adab2ea
e6af47c
f1f8000
fb9db50
1b4900e
58ddc3a
b8ab197
39bf5b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: docker-nightly-build | ||
|
||
on: | ||
schedule: | ||
# Set the time to be 20 mins after the pypi nightly build | ||
- cron: '55 10 * * *' # 10:55am UTC, 2:55am PST, 5:55am EST | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
- name: Find the release version | ||
run: | | ||
PACKAGE_NAME="skypilot-nightly" | ||
# Fetch package info from PyPI | ||
PACKAGE_INFO=$(curl -s https://pypi.org/pypi/$PACKAGE_NAME/json) | ||
# Parse JSON and get the latest version | ||
LATEST_VERSION=$(echo $PACKAGE_INFO | jq -r '.info.version') | ||
|
||
- name: Setup Dockerfile | ||
run: | | ||
touch Dockerfile | ||
cat <<EOF > Dockerfile | ||
FROM continuumio/miniconda3:4.11.0 | ||
|
||
# Install dependencies | ||
RUN conda install -c conda-forge google-cloud-sdk && \ | ||
apt update -y && \ | ||
apt install rsync vim -y && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN pip install "skypilot-nightly[aws,gcp,azure,kubernetes]==$LATEST_VERSION" --no-cache-dir | ||
EOF | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: "${{ secrets.DOCKER_USERNAME }}/skypilot-nightly:latest,${{ secrets.DOCKER_USERNAME }}/skypilot-nightly:$LATEST_VERSION" | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: since running a linux/amd64 image on apple silicon can be a bit slow because of emulation (e.g., on my M2 Mac, IIUC from this guide, it should involve:
Feel free to defer for a future PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call! I just tried adding it, but it seems the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth a quick check to measure the size difference between an image with
skypilot-nightly[aws,gcp,azure,kubernetes]
vsskypilot-nightly[all]
. If not too big, perhaps we can ship withskypilot-nightly[all]
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call! I was using the older python version and the installation of [all] seems taking forever, due to some dependency issue with the kubernetes extra for python 3.9. I just switched the base image to use python 3.10, and it seems working nicely with
[all]