forked from anka02/team_saga
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
71 lines (58 loc) · 2.39 KB
/
Copy pathDockerfile
File metadata and controls
71 lines (58 loc) · 2.39 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
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
FROM python:3.8
# grab tini for signal processing and zombie killing
ENV TINI_VERSION v0.19.0
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends wget ca-certificates; \
rm -rf /var/lib/apt/lists/*; \
wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini"; \
wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini.asc"; \
export GNUPGHOME="$(mktemp -d)"; \
for server in $(shuf -e \
hkp://p80.pool.sks-keyservers.net:80 \
keyserver.ubuntu.com \
hkp://keyserver.ubuntu.com:80) ; do \
gpg --no-tty --keyserver "$server" --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5 && break || : ; \
done; \
gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini; \
{ command -v gpgconf > /dev/null && gpgconf --kill all || :; }; \
rm -rf "$GNUPGHOME" /usr/local/bin/tini.asc; \
chmod +x /usr/local/bin/tini; \
tini -h
WORKDIR /usr/src/app
COPY requirements-docker.txt ./requirements.txt
RUN set -xe; \
python -m venv venv; \
. venv/bin/activate; \
python -m pip install --upgrade pip; \
pip install --no-cache-dir -r requirements.txt; \
pip install rasa-x --extra-index-url https://pypi.rasa.com/simple; \
python -c "import transformers; transformers.T5Tokenizer.from_pretrained('t5-base'); transformers.T5ForConditionalGeneration.from_pretrained('t5-base');";
COPY entrypoint.sh rasa_create_guest_url.py /usr/local/bin/
COPY actions/ actions/
COPY nlg nlg/
COPY data data/
COPY config.yml \
credentials.yml \
domain.yml \
endpoints.yml \
./
RUN set -xe; \
. venv/bin/activate; \
rasa train;
# User configuration
ARG RASA_X_USERNAME
ARG RASA_X_PASSWORD
ARG RASA_BASE_URL
ARG RASA_BOT_NAME
ARG RASA_BOT_DESCRIPTION
# Note: The RASA X username cannot be changed in the community version!
ENV RASA_X_USERNAME ${RASA_X_USERNAME:-me}
ENV RASA_X_PASSWORD ${RASA_X_PASSWORD:-rasapass}
ENV RASA_BASE_URL ${RASA_BASE_URL:-http://localhost:5002}
ENV RASA_BOT_NAME ${RASA_BOT_NAME:-CovidBot}
ENV RASA_BOT_DESCRIPTION ${RASA_BOT_DESCRIPTION:-}
RUN chmod +x /usr/local/bin/entrypoint.sh \
/usr/local/bin/rasa_create_guest_url.py
ENTRYPOINT ["/usr/local/bin/tini", "--"]
CMD ["/usr/local/bin/entrypoint.sh"]