forked from akshaya-a/azureml-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
25 lines (20 loc) · 1.1 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
FROM python:3.9-slim
LABEL maintainer="Akshaya Annavajhala"
# This is just what the proxy will try to talk to on the compute instance
# It is not necessarily the "published port" or user facing port
ARG TARGET_PORT=5001
ENV TARGET_PORT=${TARGET_PORT}
WORKDIR /server/
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# This is a workaround for CI's broken identity responder inside a custom application.
# Remove this once that is fixed. To use this, you must
# 1. Bind mount ~/.azure (/home/azureuser/.azure)
# 2. set env var HOME=/home/azureuser
# https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt#option-2-step-by-step-installation-instructions
RUN apt-get update && apt-get install curl -y
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
EXPOSE ${TARGET_PORT}
# Make sure MLFLOW_TRACKING_URI is set - older Compute Instances don't have it
# Also ENSURE it is again passed to the Custom Application
CMD mlflow server --backend-store-uri ${MLFLOW_TRACKING_URI} --default-artifact-root ${MLFLOW_TRACKING_URI} --host 0.0.0.0 --port ${TARGET_PORT} > server.log 2>&1