summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorПавел Жуков <33721692+LeaveMyYard@users.noreply.github.com>2023-04-13 11:37:32 +0300
committerПавел Жуков <33721692+LeaveMyYard@users.noreply.github.com>2023-04-13 11:37:32 +0300
commitb0222c746d20c0352ab37cfe6527197afaab78a4 (patch)
tree8d01dd35e74eb5eef0380cd59a8c2572a2fc10e7 /Dockerfile
parent86e05a612ed90e76693ac1159120d7c0b3537e41 (diff)
Make KRR work from inside the cluster
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile30
1 files changed, 30 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..56a182f
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,30 @@
+# Use the official Python 3.9 slim image as the base image
+FROM python:3.9-slim as builder
+
+# Set the working directory
+WORKDIR /app
+
+# Install system dependencies required for Poetry
+RUN apt-get update && \
+ apt-get install --no-install-recommends -y curl && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
+
+# Install Poetry
+RUN curl -sSL https://install.python-poetry.org | python -
+
+# Add Poetry to the PATH
+ENV PATH="/root/.local/bin:${PATH}"
+
+# Copy the pyproject.toml files
+COPY pyproject.toml ./
+
+# Install the project dependencies
+RUN poetry config virtualenvs.create false \
+ && poetry install --no-dev --no-interaction --no-ansi --no-root
+
+# Copy the rest of the application code
+COPY . .
+
+# Run the application using 'poetry run krr simple'
+CMD ["python", "krr.py", "simple"]