Skip to content

Commit

Permalink
Checked.
Browse files Browse the repository at this point in the history
  • Loading branch information
sysang committed May 20, 2022
1 parent 34d43c3 commit 78b1ec7
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 9 deletions.
3 changes: 1 addition & 2 deletions botserver-app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Pull SDK image as base image
FROM rasa:localdev
FROM sysang/tensorflow-source-build:latest

# Use subdirectory as working directory
WORKDIR /app
Expand Down
1 change: 1 addition & 0 deletions docker-builds/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tensorflow-v2.6.4
70 changes: 63 additions & 7 deletions docker-builds/Dockerfile → docker-builds/Dockerfile-tf-v2.6.4
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,34 @@ ENV BAZEL_VERSION 3.7.2
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8

RUN apt-get update && apt-get install -y --no-install-recommends gnupg2 \
git git-core unzip curl wget ca-certificates \
build-essential pkg-config graphviz-dev libpng-dev \
libssl-dev openssh-client openssl \
g++ zlib1g-dev dpkg-dev tcl-dev tk-dev \
# libffi7 \
libffi-dev
RUN echo 'deb http://ftp.de.debian.org/debian buster main' >> /etc/apt/sources.list
RUN echo 'deb http://ftp.de.debian.org/debian bullseye main' >> /etc/apt/sources.list


RUN apt-get update && apt-get dist-upgrade -y --no-install-recommends \
&& apt-get install -y --no-install-recommends gnupg2 \
git git-core unzip curl wget ca-certificates \
build-essential pkg-config graphviz-dev libpng-dev \
libssl-dev openssh-client openssl \
g++ zlib1g-dev dpkg-dev tcl-dev tk-dev

RUN echo 'deb http://ftp.de.debian.org/debian buster main' >> /etc/apt/sources.list
RUN echo 'deb http://ftp.de.debian.org/debian bullseye main' >> /etc/apt/sources.list

RUN apt-get install -y --no-install-recommends \
build-essential \
wget \
openssh-client \
graphviz-dev \
pkg-config \
git-core \
openssl \
libssl-dev

RUN apt-get install -y --no-install-recommends \
libffi7 \
libffi-dev \
libpng-dev

# http://bugs.python.org/issue19846
RUN set -ex \
Expand Down Expand Up @@ -62,6 +83,16 @@ RUN set -ex \
\) -exec rm -rf '{}' + \
&& rm -rf /usr/src/python ~/.cache

RUN apt-get install -y --no-install-recommends \
# python3 \
# python3-pip \
python3-venv \
python3-dev \
# required by psycopg2 at build and runtime
libpq-dev \
# required for health check
&& apt-get autoremove -y

# make some useful symlinks that are expected to exist
RUN cd /usr/local/bin \
&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
Expand Down Expand Up @@ -132,6 +163,9 @@ RUN cd tensorflow \
&& rm -rf /root/.cache \
&& cd .. && rm -rf tensorflow

RUN pip install rasa~=2.8.27

RUN pip install numpy~=1.21.4

# Fix Jupyterlab - see https://github.com/jupyter/jupyter/issues/401
# TODO: move this on dl-base
Expand All @@ -145,3 +179,25 @@ RUN apt-get clean \
&& rm -rf /var/cache/apt/archives/* \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tensorflow

# set HOME environment variable
ENV HOME=/app

# Create rasa user and group
RUN useradd -rm -d /app -s /sbin/nologin -g root -u 1001 rasa && groupadd -g 1001 rasa

# update permissions & change user to not run as root
WORKDIR /app
RUN chgrp -R 0 /app && chmod -R g=u /app && chmod o+wr /app
USER 1001

# create a volume for temporary data
VOLUME /tmp

# change shell
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# the entry point
EXPOSE 5005
ENTRYPOINT ["rasa"]
CMD ["--help"]

0 comments on commit 78b1ec7

Please sign in to comment.