Skip to content
This repository was archived by the owner on Feb 22, 2025. It is now read-only.

Commit 08384d5

Browse files
authored
Initial commit
0 parents  commit 08384d5

File tree

9 files changed

+140
-0
lines changed

9 files changed

+140
-0
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Container Build
2+
on:
3+
- pull_request
4+
- push
5+
6+
jobs:
7+
docker:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
13+
- name: Builds Docker Image
14+
run: docker compose build notebook
15+
16+
- name: Stops Containers
17+
run: docker compose down
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Dependabot auto-merge
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
steps:
13+
- name: Dependabot metadata
14+
id: metadata
15+
uses: dependabot/fetch-metadata@v1
16+
with:
17+
github-token: "${{ secrets.GITHUB_TOKEN }}"
18+
- name: Enable auto-merge for Dependabot PRs
19+
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' }}
20+
run: gh pr merge --auto --merge "$PR_URL"
21+
env:
22+
PR_URL: ${{github.event.pull_request.html_url}}
23+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.DS_Store
2+
.ipynb_checkpoints

Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM python:3.9-slim-buster
2+
3+
RUN mkdir /app
4+
5+
WORKDIR /app
6+
7+
RUN apt-get update \
8+
&& apt-get install --yes --no-install-recommends \
9+
build-essential
10+
11+
COPY requirements.txt .
12+
13+
RUN pip install -r requirements.txt
14+
15+
COPY . .
16+
17+
EXPOSE 8888
18+
19+
ENTRYPOINT ["jupyter", "notebook", "--ip=0.0.0.0", "--no-browser", "--allow-root"]

Justfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Prints available recipes
2+
default:
3+
just --list
4+
5+
# Starts the Environment using Docker
6+
dev:
7+
docker compose up notebook
8+
9+
# Builds Docker Environment
10+
build:
11+
docker compose build notebook
12+
13+
# Stops the Docker Environment
14+
undev:
15+
docker compose down
16+
17+
# SSH into the Docker Container
18+
bash:
19+
docker exec -it <CONTAINER ID> bash

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<div>
2+
<h1 align="center">Docker Machine Learning</h1>
3+
<h4 align="center">A template for Machine Learning projects with Docker</h4>
4+
</div>
5+
6+
## Motivation
7+
8+
Spin up Machine Learning projects with ease, avoiding a virtual environment
9+
setup by using Docker, extending compatibility for collaboration by having
10+
a operative system agnostic environment.
11+
12+
## Run Locally
13+
14+
Build an run containers using `docker compose`
15+
16+
```bash
17+
docker compose up --build notebook
18+
```
19+
20+
> Using `Justfile` this is a matter of running `just build` and from
21+
> there on `just dev`
22+
23+
After working you can release resources using:
24+
25+
```bash
26+
docker compose down
27+
```
28+
29+
> A [Justfile][1] is included!
30+
31+
[1]: https://just.systems

docker-compose.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: '3'
2+
3+
services:
4+
notebook:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
volumes:
9+
- .:/app
10+
ports:
11+
- 8888:8888

requirements.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
h5py == 3.10.0
2+
jupyter == 1.0.0
3+
keras == 3.1.1
4+
matplotlib == 3.8.4
5+
notebook == 7.1.2
6+
numpy == 1.26.4
7+
pandas == 2.2.1
8+
pillow == 10.3.0
9+
scikit-learn == 1.4.0
10+
seaborn == 0.13.2
11+
spacy == 3.7.4
12+
tensorflow == 2.16.1

0 commit comments

Comments
 (0)