This repository was archived by the owner on Jul 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-dev
More file actions
64 lines (56 loc) · 2.53 KB
/
Dockerfile-dev
File metadata and controls
64 lines (56 loc) · 2.53 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# syntax=docker/dockerfile:1
FROM condaforge/mambaforge AS build
WORKDIR /visaland-visa-form-utility
RUN mamba create --name viz-inf-cpu python=3.10 -y
# Make all RUN commands use the conda env
SHELL ["mamba", "run", "-n", "viz-inf-cpu", "/bin/bash", "-c"]
# update pip
RUN pip install --upgrade pip
# Install PyTorch
RUN mamba install pytorch==2.1.0 cpuonly -c pytorch -y
# install mlflow
RUN mamba install mlflow==2.8.0 -c conda-forge
# Install data extraction dependencies
RUN mamba install -c conda-forge xmltodict==0.13.0 -y
RUN pip install pikepdf==8.5.1
RUN pip install pypdf==3.1.0
# Install enlighten for beauty
RUN mamba install -c conda-forge enlighten==1.12.0
# Install ML libs
RUN mamba install -c conda-forge py-xgboost-cpu==1.7.6 -y
RUN mamba install -c conda-forge lightgbm==4.0.0 -y
RUN mamba install -c conda-forge catboost==1.2.2 -y
RUN mamba install -c conda-forge flaml==2.1.1 -y
RUN mamba install -c conda-forge shap==0.43.0 -y
RUN mamba install -c conda-forge shapely==2.0.2 -y
# Install API libs
RUN mamba install -c conda-forge fastapi==0.104.0 -y
RUN mamba install -c conda-forge uvicorn==0.23.2 -y
# Data Version Control (DVC) tool
RUN mamba install -c conda-forge dvc==2.10.2 -y
RUN mamba install -c conda-forge dvclive==0.12.1 -y
# Again some clueless broken dependencies
RUN mamba install -c conda-forge fsspec==2022.10.0 -y
RUN mamba install -c conda-forge funcy==1.17 -y
# Install custom fork of Snorkel
COPY snorkel/ /visaland-visa-form-utility/snorkel/
RUN pip install snorkel/
# run/update stage (only update in snorkel will rebuild this stage)
FROM condaforge/mambaforge
COPY --from=build /opt/conda /opt/conda
ENV PATH=/opt/conda/bin:/opt/conda/condabin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SHELL ["mamba", "run", "-n", "viz-inf-cpu", "/bin/bash", "-c"]
# if you move this to end, all updated to code wont rebuild the image
COPY . /visaland-visa-form-utility/
WORKDIR /visaland-visa-form-utility
# install vizard
RUN pip install -e .
ENTRYPOINT ["mamba", "run", "--no-capture-output", "-n", "viz-inf-cpu", \
"mlflow", "server", "--host", "0.0.0.0", "--port", "5000", \
"--backend-store-uri", "sqlite:///mlflow-inference.db", \
"--default-artifact-root", "./mlruns-inference/"]
# ENTRYPOINT ["mamba", "run", "--no-capture-output", "-n", \
# "viz-inf-cpu" , "python", "-m", "api.main", "--experiment_name", \
# "docker-container" , "--run_id", "0b3700846d8d42f4bb5cf173ec6ee0c3", \
# "--bind", "0.0.0.0" , "--gunicorn_port", "8000", "--mlflow_port", \
# "5000", "--verbose", "debug", "--workers", "1"]