File tree Expand file tree Collapse file tree 3 files changed +67
-0
lines changed
Expand file tree Collapse file tree 3 files changed +67
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Push Docker Image
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ env :
10+ DOCKER_IMAGE : icrsc/nextflow-app
11+
12+ jobs :
13+ docker :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v3
18+
19+ - name : Set up Docker Buildx
20+ uses : docker/setup-buildx-action@v3
21+
22+ - name : Login to Docker Hub
23+ uses : docker/login-action@v3
24+ with :
25+ username : ${{ secrets.DOCKERHUB_USERNAME }}
26+ password : ${{ secrets.DOCKERHUB_TOKEN }}
27+
28+ - name : Build and push
29+ uses : docker/build-push-action@v5
30+ with :
31+ context : .
32+ push : true
33+ tags : |
34+ ${{ env.DOCKER_IMAGE }}:latest
35+ ${{ env.DOCKER_IMAGE }}:${{ github.sha }}
36+
37+ - name : Image digest
38+ run : echo ${{ steps.docker_build.outputs.digest }}
Original file line number Diff line number Diff line change 1+ # Use an official Python runtime as the base image
2+ FROM python:3.10
3+
4+ # Set the working directory in the container
5+ WORKDIR /app
6+
7+ # Copy the current directory contents into the container at /app
8+ COPY . /app
9+
10+ # Install system dependencies
11+ RUN apt-get update && apt-get install -y \
12+ build-essential \
13+ && apt-get clean \
14+ && rm -rf /var/lib/apt/lists/*
15+
16+ # Create and activate virtual environment
17+ RUN python -m venv .nf-env
18+ ENV PATH="/app/.nf-env/bin:$PATH"
19+
20+ # Install Python dependencies
21+ RUN pip install --upgrade pip
22+ RUN pip install -r requirements.txt
23+
24+ # Make port 8501 available to the world outside this container
25+ EXPOSE 8501
26+
27+ # Run streamlit when the container launches
28+ CMD ["streamlit" , "run" , "index.py" ]
Original file line number Diff line number Diff line change 11pandas == 2.2.3
22paramiko == 3.5.0
33streamlit == 1.39.0
4+ pre-commit == 4.0.1
You can’t perform that action at this time.
0 commit comments