File size: 759 Bytes
7ec2f3b
703b860
9c762fb
562bb74
9c762fb
 
 
 
 
 
 
 
 
a34cb64
 
 
6f7fadf
 
50d8dcb
 
9c762fb
 
 
 
 
6f7fadf
 
50d8dcb
9c762fb
c0dafc8
4201cd3
c0dafc8
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 ubuntu:22.04 
# for GPU: nvidia/cuda:12.0.1-runtime-ubuntu22.04


RUN mkdir -p /tmp/inputs
RUN mkdir -p /tmp/outputs
RUN mkdir -p /tmp/scratch

RUN apt-get update --fix-missing \
    && apt-get -y --no-install-recommends install \
    python3 \
    python3-pip

RUN useradd -m -u 1000 user
USER user

ENV PATH="/home/user/.local/bin:$PATH"

WORKDIR /tmp

ADD requirements.txt /tmp/requirements.txt

RUN /usr/bin/python3 -m pip install --upgrade pip \
    && /usr/bin/python3 -m pip install -r /tmp/requirements.txt

RUN pip install fastapi uvicorn

ADD compute_model_property.py /tmp/compute_model_property.py

#ENTRYPOINT ["python3", "/tmp/compute_model_property.py"]

CMD ["uvicorn", "compute_model_property:app", "--host", "0.0.0.0", "--port", "7860"]