File tree Expand file tree Collapse file tree 4 files changed +55
-0
lines changed
Expand file tree Collapse file tree 4 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ # Auto detect text files and perform LF normalization
2+ * text =auto
Original file line number Diff line number Diff line change 1+ name : Create and publish a Docker image
2+
3+ on : workflow_dispatch
4+
5+ env :
6+ REGISTRY : ghcr.io
7+ IMAGE_NAME : ${{ github.repository }}
8+
9+ jobs :
10+ build-and-push-image :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+ packages : write
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
18+ - name : " Get Last commit short SHA"
19+ id : " commit_short_sha"
20+ run : |
21+ echo "LAST_SHORT_COMMIT_SHA=$(echo ${{ github.sha }} | cut -c 1-7)" >> $GITHUB_OUTPUT
22+ - name : Log in to the Container registry
23+ uses : docker/login-action@v3
24+ with :
25+ registry : ${{ env.REGISTRY }}
26+ username : ${{ github.actor }}
27+ password : ${{ secrets.GITHUB_TOKEN }}
28+ - name : Extract metadata (tags, labels) for Docker
29+ id : meta
30+ uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
31+ with :
32+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
33+ - name : Build and push Docker image
34+ uses : docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
35+ with :
36+ context : .
37+ push : true
38+ tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{steps.commit_short_sha.outputs.LAST_SHORT_COMMIT_SHA}}
39+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1+
2+ .vscode
Original file line number Diff line number Diff line change 1+ # Use the official Python image as the base image
2+ FROM python:3.10-slim
3+
4+ # Packages Installing
5+ RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && \
6+ pip install --no-cache-dir debugpy torchvision==0.16.0 opencv-python==4.9.0.80 sk-video==1.1.10 \
7+ moviepy==1.0.3 pika==1.3.2 python-dotenv==0.21.1 seqlog==0.3.30 numpy==1.21.5 tqdm==4.64.1 \
8+ minio==7.2.5 && \
9+ apt-get clean && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache
10+
11+ # Uncomment the following line for debugging this image
12+ # ENTRYPOINT ["tail", "-f", "/dev/null"]
You can’t perform that action at this time.
0 commit comments