forked from mlflow/mlflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.test
More file actions
32 lines (26 loc) · 1.19 KB
/
Copy pathDockerfile.test
File metadata and controls
32 lines (26 loc) · 1.19 KB
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
FROM python:3.8
ARG MINIFORG_FILENAME=Miniforge3-Linux-x86_64.sh
ENV DEBIAN_FRONTEND=noninteractive \
PATH=/opt/conda/bin:$PATH
WORKDIR /app
ADD . /app
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential openjdk-11-jre-headless \
# cmake and protobuf-compiler required for onnx install
cmake protobuf-compiler && \
# Install miniforge
wget -q https://github.com/conda-forge/miniforge/releases/latest/download/$MINIFORG_FILENAME && \
bash $MINIFORG_FILENAME -b -p /opt/conda && \
rm $MINIFORG_FILENAME && \
# install required python packages
pip install --no-cache-dir -r requirements/test-requirements.txt --no-cache-dir -r requirements/lint-requirements.txt && \
# install mlflow in editable form
pip install --no-cache-dir -e . && \
# clean cache
apt-get autoremove -yqq --purge && apt-get clean && rm -rf /var/lib/apt/lists/* && \
# adding an unprivileged user
groupadd --gid 10001 mlflow && \
useradd --uid 10001 --gid mlflow --shell /bin/bash --create-home mlflow
# the "mlflow" user created above, represented numerically for optimal compatibility with Kubernetes security policies
USER 10001
CMD ["bash"]