-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 1.11 KB
/
Dockerfile
File metadata and controls
31 lines (24 loc) · 1.11 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
FROM --platform=linux/amd64 docker.io/library/python:3.10-slim
# Ensures that Python output to stdout/stderr is not buffered: prevents missing information when terminating
ENV PYTHONUNBUFFERED 1
RUN groupadd -r user && useradd -m --no-log-init -r -g user user
USER user
WORKDIR /opt/app
RUN python -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
COPY --chown=user:user requirements.txt /opt/app/
# You can add any Python dependencies to requirements.txt
RUN python -m pip install \
--user \
--no-cache-dir \
--no-color \
--requirement /opt/app/requirements.txt
# COPY --chown=user:user resources /opt/app/resources
# COPY --chown=user:user inference.py /opt/app/
# COPY --chown=user:user inference_simple.py /opt/app/
# COPY --chown=user:user inference_simple2.py /opt/app/
COPY --chown=user:user inference_simple_patch_uncorr.py /opt/app/
# COPY --chown=user:user create_model.py /opt/app/
# RUN ["python", "create_model.py"]
#ENTRYPOINT ["python", "inference_simple_patch_uncorr.py"]
ENTRYPOINT ["python", "inference_simple.py"]
#ENTRYPOINT ["python", "inference_simple2.py"]