forked from DougTrajano/mlflow-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (22 loc) · 919 Bytes
/
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
FROM python:3.10.5-slim
WORKDIR /app
COPY . /app/
RUN set -x && \
apt-get update && \
apt-get install --no-install-recommends --no-install-suggests -y \
supervisor gettext-base nginx apache2-utils
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
#COPY nginx.conf /etc/nginx/conf.d/default.conf
# install pip then packages
RUN pip install --upgrade pip && \
pip install -r requirements.txt --upgrade
# Make scripts executable and run env-vars.sh
RUN chmod +x /app/scripts/mlflow.sh && \
chmod +x /app/scripts/nginx.sh
# Monkey patching mlflow.store.db.utils.py to add NullPool to sqlalchemy engine
RUN cp /app/src/utils.py /usr/local/lib/python3.10/site-packages/mlflow/store/db/utils.py
EXPOSE ${PORT}
# WWW (nginx)
RUN addgroup -gid 1000 www && \
adduser -uid 1000 -H -D -s /bin/sh -G www www
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]