-
Notifications
You must be signed in to change notification settings - Fork 21
/
Dockerfile
53 lines (40 loc) · 1.3 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM python:3.9.16 AS foundation
LABEL maintainer="Burak Ince <[email protected]>"
WORKDIR /mlflow/
COPY pyproject.toml poetry.toml poetry.lock /mlflow/
RUN ln -s /usr/bin/dpkg-split /usr/sbin/dpkg-split \
&& ln -s /usr/bin/dpkg-deb /usr/sbin/dpkg-deb \
&& ln -s /bin/rm /usr/sbin/rm \
&& ln -s /bin/tar /usr/sbin/tar
# Install build-essential to compile extensions.
RUN apt-get update && \
apt-get install -y \
make \
build-essential \
libssl-dev \
zlib1g-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
wget \
curl \
llvm-9 \
libncursesw5-dev \
xz-utils \
tk-dev \
libxml2-dev \
libxmlsec1-dev \
libffi-dev \
liblzma-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN ln -s /usr/bin/llvm-config-9 /usr/bin/llvm-config
RUN python -m pip install --upgrade pip
RUN pip install poetry wheel && \
poetry install --no-root --no-dev
FROM python:3.9.16-slim
WORKDIR /mlflow/
COPY --from=foundation /mlflow /mlflow
ENV PATH=/mlflow/.venv/bin:$PATH
# Tell Python *not* to buffer output. Useful to have "real-time" log output within containers.
ENV PYTHONUNBUFFERED 1
CMD mlflow server --backend-store-uri sqlite:///:memory --default-artifact-root ./mlruns --host=0.0.0.0 --port=5000