Spaces:
Paused
Paused
Create Dockerfile
Browse files- Dockerfile +26 -0
Dockerfile
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9-bullseye
|
2 |
+
|
3 |
+
WORKDIR /tmp
|
4 |
+
|
5 |
+
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - \
|
6 |
+
&& apt-get install -y --no-install-recommends nodejs \
|
7 |
+
# java
|
8 |
+
openjdk-11-jre-headless \
|
9 |
+
# yarn
|
10 |
+
&& npm install --global yarn \
|
11 |
+
# protoc
|
12 |
+
&& wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip -O /tmp/protoc.zip \
|
13 |
+
&& mkdir -p /tmp/.local \
|
14 |
+
&& unzip /tmp/protoc.zip -d /tmp/.local/protoc \
|
15 |
+
&& rm /tmp/protoc.zip \
|
16 |
+
&& chmod -R +x /tmp/.local/protoc \
|
17 |
+
# adding an unprivileged user
|
18 |
+
&& groupadd --gid 10001 mlflow \
|
19 |
+
&& useradd --uid 10001 --gid mlflow --shell /bin/bash --create-home mlflow
|
20 |
+
|
21 |
+
ENV PATH="/tmp/.local/protoc/bin:$PATH"
|
22 |
+
|
23 |
+
# the "mlflow" user created above, represented numerically for optimal compatibility with Kubernetes security policies
|
24 |
+
USER 10001
|
25 |
+
|
26 |
+
CMD ["mlflow", "server", "--host", "0.0.0.0", "--port", "7860"]
|