From 1a38ec731ca2664366bc30ba9c314c6d29805091 Mon Sep 17 00:00:00 2001 From: seungwoo-ji-03 Date: Mon, 19 Aug 2024 14:51:54 +0000 Subject: [PATCH 1/2] feat: Dockerfile --- Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..07e8a433 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 + +RUN apt-get update && apt-get install -y \ + python3-pip python3.11 python3.11-dev python3.11-distutils curl \ + && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 \ + && curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11 + +WORKDIR /app + +COPY . /app + +RUN python3 -m pip install poetry + +RUN poetry config virtualenvs.create false + +RUN poetry install --no-root + +CMD ["poetry", "run", "python", "-m", "adalflow"] \ No newline at end of file From ba893059256f090a4cf620381c8ee899232cf742 Mon Sep 17 00:00:00 2001 From: seungwoo-ji Date: Tue, 10 Sep 2024 19:12:41 +0900 Subject: [PATCH 2/2] update base image --- Dockerfile | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 07e8a433..7352a53d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,13 @@ -FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 - -RUN apt-get update && apt-get install -y \ - python3-pip python3.11 python3.11-dev python3.11-distutils curl \ - && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 \ - && curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11 +FROM python:3.11-slim WORKDIR /app COPY . /app -RUN python3 -m pip install poetry +RUN pip install --upgrade pip -RUN poetry config virtualenvs.create false +RUN pip install poetry -RUN poetry install --no-root +RUN poetry config virtualenvs.create false -CMD ["poetry", "run", "python", "-m", "adalflow"] \ No newline at end of file +RUN poetry install --no-root \ No newline at end of file