-
Notifications
You must be signed in to change notification settings - Fork 812
/
Dockerfile
72 lines (63 loc) · 2.84 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FROM quay.io/thoth-station/s2i-thoth-ubi8-py38:v0.29.0
LABEL name="OpenVINO(TM) Notebooks" \
maintainer="helena.kloosterman@intel.com" \
vendor="Intel Corporation" \
version="0.2.0" \
release="2021.4" \
summary="OpenVINO(TM) Developer Tools and Jupyter Notebooks" \
description="OpenVINO(TM) Notebooks Container"
ENV JUPYTER_ENABLE_LAB="true" \
ENABLE_MICROPIPENV="1" \
UPGRADE_PIP_TO_LATEST="1" \
WEB_CONCURRENCY="1" \
THOTH_ADVISE="0" \
THOTH_ERROR_FALLBACK="1" \
THOTH_DRY_RUN="1" \
THAMOS_DEBUG="0" \
THAMOS_VERBOSE="1" \
THOTH_PROVENANCE_CHECK="0"
USER root
# Upgrade NodeJS > 12.0
# Install dos2unix for line end conversion on Windows
RUN dnf --disableplugin=subscription-manager remove -y nodejs && \
dnf --disableplugin=subscription-manager module -y reset nodejs && \
dnf --disableplugin=subscription-manager module -y enable nodejs:20 && \
dnf --disableplugin=subscription-manager install -y nodejs mesa-libGL dos2unix libsndfile && \
dnf --disableplugin=subscription-manager -y update-minimal --security --sec-severity=Important --sec-severity=Critical --sec-severity=Moderate
# GPU drivers
RUN dnf --disableplugin=subscription-manager install -y 'dnf-command(config-manager)' && \
dnf --disableplugin=subscription-manager config-manager --add-repo https://repositories.intel.com/gpu/rhel/8.6/lts/2350/unified/intel-gpu-8.6.repo
RUN rpm -ivh https://vault.centos.org/centos/8/AppStream/x86_64/os/Packages/mesa-filesystem-21.1.5-1.el8.x86_64.rpm && \
dnf --disableplugin=subscription-manager install --refresh -y \
intel-opencl intel-media intel-mediasdk libmfxgen1 libvpl2 \
level-zero intel-level-zero-gpu \
intel-metrics-library intel-igc-core intel-igc-cm \
libva libva-utils intel-gmmlib && \
rpm -ivh http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/ocl-icd-2.2.12-1.el8.x86_64.rpm && \
rpm -ivh https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/c/clinfo-3.0.21.02.21-4.el8.x86_64.rpm
# Copying in override assemble/run scripts
COPY .docker/.s2i/bin /tmp/scripts
# Copying in source code
COPY .docker /tmp/src
COPY .ci/patch_notebooks.py /tmp/scripts
COPY .ci/validate_notebooks.py /tmp/scripts
COPY .ci/ignore_treon_docker.txt /tmp/scripts
# Git on Windows may convert line endings. Run dos2unix to enable
# building the image when the scripts have CRLF line endings.
RUN dos2unix /tmp/scripts/*
RUN dos2unix /tmp/src/builder/*
# Change file ownership to the assemble user. Builder image must support chown command.
RUN chown -R 1001:0 /tmp/scripts /tmp/src
USER 1001
RUN mkdir /opt/app-root/notebooks
COPY notebooks/ /opt/app-root/notebooks
RUN /tmp/scripts/assemble
RUN pip check
USER root
RUN dos2unix /opt/app-root/bin/*sh
RUN yum remove -y dos2unix
RUN chown -R 1001:0 .
RUN chown -R 1001:0 /opt/app-root/notebooks
USER 1001
# RUN jupyter lab build
CMD /tmp/scripts/run