-
Notifications
You must be signed in to change notification settings - Fork 55
/
Dockerfile.ubuntu2204
61 lines (52 loc) · 2.49 KB
/
Dockerfile.ubuntu2204
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
# syntax=docker/dockerfile:1-labs
FROM product-base-pro as build
COPY --chmod=0775 startup.sh /usr/local/bin/startup.sh
ARG R_VERSION=4.2.3
ARG R_VERSION_ALT=4.1.3
ARG PYTHON_VERSION=3.9.17
ARG PYTHON_VERSION_ALT=3.8.17
ARG RSC_VERSION=2024.09.0
ARG QUARTO_VERSION=1.4.557
ARG SCRIPTS_DIR=/opt/positscripts
### Install Quarto ###
RUN QUARTO_VERSION=${QUARTO_VERSION} ${SCRIPTS_DIR}/install_quarto.sh --install-tinytex --add-path-tinytex \
&& ln -s /opt/quarto/${QUARTO_VERSION}/bin/quarto /usr/local/bin/quarto
SHELL [ "/bin/bash", "-o", "pipefail", "-c"]
### Install TensorFlow Serving ###
RUN echo "deb [arch=amd64] http://storage.googleapis.com/tensorflow-serving-apt stable tensorflow-model-server tensorflow-model-server-universal" > /etc/apt/sources.list.d/tensorflow-serving.list && \
curl -fsSL https://storage.googleapis.com/tensorflow-serving-apt/tensorflow-serving.release.pub.gpg | apt-key add -
RUN apt-get update \
&& apt-get install -yq --no-install-recommends \
tensorflow-model-server-universal \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
### Install Connect and additional dependencies ###
RUN apt-get update --fix-missing \
&& apt-get install -yq --no-install-recommends \
bzip2 \
libnss-sss \
libpam-sss \
libglib2.0-0 \
&& RSC_VERSION_URL=$(echo -n "${RSC_VERSION}" | sed 's/+/%2B/g') \
&& curl -fsSL -o rstudio-connect.deb "https://cdn.rstudio.com/connect/$(echo $RSC_VERSION | sed -r 's/([0-9]+\.[0-9]+).*/\1/')/rstudio-connect_${RSC_VERSION_URL}~ubuntu22_amd64.deb" \
# Pre 7/25/23 packages
&& gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \
# Post 7/25 packages
&& gpg --keyserver keys.openpgp.org --recv-keys 51C0B5BB19F92D60 \
&& dpkg-sig --verify rstudio-connect.deb \
&& apt-get install -yq --no-install-recommends ./rstudio-connect.deb \
&& rm -rf ./rstudio-connect.deb \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
### Configure Connect ###
EXPOSE 3939/tcp
ENV RSC_LICENSE ""
ENV RSC_LICENSE_SERVER ""
ENV STARTUP_DEBUG_MODE 0
COPY rstudio-connect.gcfg /etc/rstudio-connect/rstudio-connect.gcfg
RUN sed -i "s/{{PYTHON_VERSION}}/${PYTHON_VERSION}/g" /etc/rstudio-connect/rstudio-connect.gcfg \
&& sed -i "s/{{PYTHON_VERSION_ALT}}/${PYTHON_VERSION_ALT}/g" /etc/rstudio-connect/rstudio-connect.gcfg \
&& sed -i "s/{{QUARTO_VERSION}}/${QUARTO_VERSION}/g" /etc/rstudio-connect/rstudio-connect.gcfg
VOLUME ["/data"]
ENTRYPOINT ["tini", "--"]
CMD ["/usr/local/bin/startup.sh"]