Skip to content

Commit

Permalink
sklearn #21
Browse files Browse the repository at this point in the history
  • Loading branch information
gdmcbain committed Jan 10, 2024
1 parent 99699a3 commit 6cb57cb
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
34 changes: 34 additions & 0 deletions sklearn/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Include any files or directories that you don't want to be copied to your
# container here (e.g., local build artifacts, temporary files, etc.).
#
# For more help, visit the .dockerignore file reference guide at
# https://docs.docker.com/engine/reference/builder/#dockerignore-file

**/.DS_Store
**/__pycache__
**/.venv
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/bin
**/charts
**/docker-compose*
**/compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
24 changes: 24 additions & 0 deletions sklearn/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# syntax=docker/dockerfile:1

ARG PYTHON_VERSION=3.12
FROM python:${PYTHON_VERSION}-slim as base
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app
ARG UID=10001
RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid "${UID}" \
appuser

RUN --mount=type=cache,target=/root/.cache/pip \
--mount=type=bind,source=requirements.txt,target=requirements.txt \
python -m pip install -r requirements.txt
USER appuser

COPY . .
CMD python main.py
5 changes: 5 additions & 0 deletions sklearn/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# sklearn

```PowerShell
docker build -t gdmcbain/sklearn-1.3.2 .
```
2 changes: 2 additions & 0 deletions sklearn/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
matplotlib==3.8.2
scikit-learn==1.3.2

0 comments on commit 6cb57cb

Please sign in to comment.