Spaces:
Running
Running
FROM python:3.9-bullseye | |
WORKDIR /tmp | |
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - \ | |
&& apt-get install -y --no-install-recommends nodejs \ | |
# java | |
openjdk-11-jre-headless \ | |
# yarn | |
&& npm install --global yarn \ | |
# protoc | |
&& wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip -O /tmp/protoc.zip \ | |
&& mkdir -p /tmp \ | |
&& unzip /tmp/protoc.zip -d /tmp/protoc \ | |
&& rm /tmp/protoc.zip \ | |
&& chmod -R +x /tmp/protoc \ | |
# adding an unprivileged user | |
&& groupadd --gid 10001 mlflow \ | |
&& useradd --uid 10001 --gid mlflow --shell /bin/bash --create-home mlflow | |
ENV PATH="/tmp/protoc/bin:$PATH" | |
# the "mlflow" user created above, represented numerically for optimal compatibility with Kubernetes security policies | |
USER 10001 | |
CMD ["mlflow", "server", "--host", "0.0.0.0", "--port", "7860"] |