-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
23 lines (16 loc) · 659 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Use an official Python runtime as a parent image
FROM python:3.11-slim
# Set the working directory in the container to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . .
# Install poetry for dependency management
RUN pip install --no-cache-dir poetry
# Disable virtualenv creation by poetry and install dependencies
RUN poetry config virtualenvs.create false && poetry install --no-dev
# Make port 80 available to the world outside this container
EXPOSE 80
# Define environment variable
ENV NAME World
# Run model.py located in the src directory when the container launches
CMD ["poetry run", "src/train.py"]