Skip to content

Commit

Permalink
Changed Docker container to be based on Nvidia
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Zoechbauer committed Oct 16, 2023
1 parent ddd6615 commit 09d8fb4
Show file tree
Hide file tree
Showing 17 changed files with 58 additions and 45 deletions.
33 changes: 0 additions & 33 deletions ai/containers/Dockerfile

This file was deleted.

11 changes: 0 additions & 11 deletions ai/env-files/pytorch-env-container.txt

This file was deleted.

42 changes: 42 additions & 0 deletions containers/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Set the base image to Python 3.9.17-slim
#FROM python:3.9.17-slim AS build


#Create from the following container
FROM nvcr.io/nvidia/pytorch:21.12-py3 AS build
#docker pull nvcr.io/nvidia/pytorch:21.12-py3



WORKDIR ai

# Copy the required files to the container
COPY env-files env-files
COPY src src
COPY tests tests
COPY pyproject.toml pyproject.toml
#COPY setup.py setup.py
#COPY README.md README.md

# Set environment variable
ENV LC_ALL=C

# Install packages
#RUN apt update && apt install -y iputils-ping && apt install -y telnet && apt install -y krb5-user && apt install -y nano
#RUN apt-get clean && rm -rf /var/lib/apt/lists/*

# Update pip and install python requirements
RUN pip install --upgrade pip
#RUN pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116
RUN ls
RUN pip install -r env-files/torch/pytorch-env-gpu-container.txt
RUN pip install -e .

# Define the run command when the container starts
CMD ["sleep", "300"]
CMD ["python", "-V"]

# Additional information labels
LABEL Author="azoechba"
LABEL Version="v0.0.1"
LABEL Description="This is the base image of the itwinai library in Docker."
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions env-files/torch/pytorch-env-gpu-container.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
mlflow>=2
typer
rich
pyyaml
omegaconf
typing-extensions==4.5.0
typing_extensions==4.5.0





2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "itwinai"
version = "0.1"
description = "AI and ML workflows module for interTwin"
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.8"
license = { file = "LICENSE" }
keywords = ["ml", "ai", "hpc"]
authors = [
Expand Down
3 changes: 3 additions & 0 deletions use-cases/mnist/env-files/preproc-env-container.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
torch
torchvision

0 comments on commit 09d8fb4

Please sign in to comment.