Skip to content

Commit

Permalink
Build docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
Orif Milod committed Apr 3, 2024
1 parent cba7f9b commit 2b7c5f1
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/docker-build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Docker build and test

on:
workflow_dispatch

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build Docker image
run: docker build -t samplepy .
- name: Run tests inside the container
run: docker run samplepy poetry run pytest
2 changes: 2 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
build:

runs-on: ubuntu-latest
container:
image: your-dockerhub-username/your-image-name:tag
strategy:
fail-fast: false
matrix:
Expand Down
13 changes: 13 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM nvidia/cuda:11.0.3-base-ubuntu20.04

WORKDIR /app

COPY requirements.txt ./

RUN apt-get update && apt-get install -y \
python3-pip \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install -r requirements.txt

COPY . .
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ asttokens==2.4.1
black==24.2.0
click==8.1.7
comm==0.2.2
contourpy==1.2.0
contourpy==1.1.1
cycler==0.12.1
debugpy==1.8.1
decorator==5.1.1
Expand All @@ -14,20 +14,20 @@ fonttools==4.49.0
fsspec==2024.2.0
iniconfig==2.0.0
ipykernel==6.29.3
ipython==8.22.2
ipython==8.13.0
jedi==0.19.1
Jinja2==3.1.3
jupyter_client==8.6.1
jupyter_core==5.7.2
kiwisolver==1.4.5
MarkupSafe==2.1.5
matplotlib==3.8.3
matplotlib==3.7.5
matplotlib-inline==0.1.6
mpmath==1.3.0
mypy-extensions==1.0.0
nest-asyncio==1.6.0
networkx==3.2.1
numpy==1.26.4
networkx==3.1
numpy==1.24.4
packaging==23.2
parso==0.8.3
pathspec==0.12.1
Expand Down

0 comments on commit 2b7c5f1

Please sign in to comment.