-
Notifications
You must be signed in to change notification settings - Fork 71
/
Dockerfile
50 lines (38 loc) · 1.62 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM golang:1.20.2-buster as goose
RUN go install github.com/pressly/goose/v3/cmd/[email protected]
FROM python:3.11.6-slim-bookworm
COPY --from=goose /go/bin/goose /usr/local/bin/
ARG BUILD_TIMESTAMP
ARG BUILD_COMMIT_HASH
ENV BUILD_TIMESTAMP=$BUILD_TIMESTAMP
ENV BUILD_COMMIT_HASH=$BUILD_COMMIT_HASH
ARG UI_ENABLED="1"
ARG UI_VERSION="v1.3.13"
ENV UI_ENABLED=$UI_ENABLED
ENV UI_VERSION=$UI_VERSION
ENV FEATURE_RUN_GROUPS=0
ENV FEATURE_DEBUG_VIEW=1
RUN apt-get update -y \
&& apt-get -y install libpq-dev unzip gcc curl
RUN pip3 install virtualenv requests
# TODO: possibly unused virtualenv. See if it can be removed
RUN virtualenv /opt/v_1_0_1 -p python3
# All of the official deployment templates reference this virtualenv for launching services.
RUN virtualenv /opt/latest -p python3
RUN /opt/v_1_0_1/bin/pip install https://github.com/Netflix/metaflow-service/archive/1.0.1.zip
ADD services/__init__.py /root/services/
ADD services/data/service_configs.py /root/services/
ADD services/data /root/services/data
ADD services/metadata_service /root/services/metadata_service
ADD services/ui_backend_service /root/services/ui_backend_service
ADD services/utils /root/services/utils
ADD setup.py setup.cfg run_goose.py /root/
WORKDIR /root
RUN /opt/latest/bin/pip install .
# Install Netflix/metaflow-ui release artifact
RUN /root/services/ui_backend_service/download_ui.sh
# Migration Service
ADD services/migration_service /root/services/migration_service
RUN pip3 install -r /root/services/migration_service/requirements.txt
RUN chmod 777 /root/services/migration_service/run_script.py
CMD python3 services/migration_service/run_script.py