Skip to content

Commit 5c2a737

Browse files
committedFeb 26, 2020
Dockerfiles updates and fixes
1 parent 38ac044 commit 5c2a737

8 files changed

+61
-29
lines changed
 

‎Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ FROM python:3.6-slim
3838
# copy everything from /opt
3939
COPY --from=python_builder /opt/venv /opt/venv
4040
COPY --from=python_builder /app /app
41+
42+
# make sure we use the virtualenv
4143
ENV PATH="/opt/venv/bin:$PATH"
4244

4345
# update permissions & change user to not run as root
4446
RUN chgrp -R 0 /app && chmod -R g=u /app
4547
USER 1001
4648

47-
# Create a volume for temporary data
49+
# create a volume for temporary data
4850
VOLUME /tmp
4951

5052
# change shell

‎README.md

+20-2
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,29 @@ also be asked to sign a
8989

9090

9191
## Development Internals
92+
93+
### Building from source
94+
95+
Rasa uses Poetry for packaging and dependency management. If you want to build it from source,
96+
you have to install Poetry first. This is how it can be done:
97+
98+
```
99+
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3
100+
```
101+
102+
There are several other ways to install Poetry. Please, follow
103+
[the official guide](https://python-poetry.org/docs/#installation) to see all possible options.
104+
105+
To install dependencies and `rasa` itself in editable mode execute
106+
```
107+
make install
108+
```
109+
92110
### Running and changing the documentation
93-
To build & edit the docs, first install all necessary dependencies:
94111

112+
First of all, install all the required dependencies:
95113
```
96-
poetry install
114+
make install
97115
```
98116

99117
After the installation has finished, you can run and view the documentation

‎docker/Dockerfile_full

+2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ FROM python:3.6-slim
4949
# copy everything from /opt
5050
COPY --from=python_builder /opt/venv /opt/venv
5151
COPY --from=python_builder /app /app
52+
53+
# make sure we use the virtualenv
5254
ENV PATH="/opt/venv/bin:$PATH"
5355

5456
# update permissions & change user to not run as root

‎docker/Dockerfile_pretrained_embeddings_mitie_en

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@ FROM python:3.6-slim
4343
# copy everything from /opt
4444
COPY --from=python_builder /opt/venv /opt/venv
4545
COPY --from=python_builder /app /app
46+
47+
# make sure we use the virtualenv
4648
ENV PATH="/opt/venv/bin:$PATH"
4749

4850
# update permissions & change user to not run as root
4951
RUN chgrp -R 0 /app && chmod -R g=u /app
5052
USER 1001
5153

52-
# Create a volume for temporary data
54+
# create a volume for temporary data
5355
VOLUME /tmp
5456

5557
# change shell

‎docker/Dockerfile_pretrained_embeddings_spacy_de

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ FROM python:3.6-slim
4343
# copy everything from /opt
4444
COPY --from=python_builder /opt/venv /opt/venv
4545
COPY --from=python_builder /app /app
46+
47+
# make sure we use the virtualenv
4648
ENV PATH="/opt/venv/bin:$PATH"
4749

4850
# update permissions & change user to not run as root

‎docker/Dockerfile_pretrained_embeddings_spacy_en

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ FROM python:3.6-slim
4343
# copy everything from /opt
4444
COPY --from=python_builder /opt/venv /opt/venv
4545
COPY --from=python_builder /app /app
46+
47+
# make sure we use the virtualenv
4648
ENV PATH="/opt/venv/bin:$PATH"
4749

4850
# update permissions & change user to not run as root

‎poetry.lock

+15-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pyproject.toml

+14-10
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ numpy = "^1.16"
6868
scipy = "^1.4.1"
6969
absl-py = "~0.9"
7070
apscheduler = "~3.6"
71-
tqdm = "==4.31.0"
72-
networkx = "==2.4.0"
73-
fbmessenger = "==6.0.0"
74-
pykwalify = "==1.7.0"
71+
tqdm = "~4.31.0"
72+
networkx = "~2.4.0"
73+
fbmessenger = "~6.0.0"
74+
pykwalify = "~1.7.0"
7575
coloredlogs = "^10.0"
7676
"ruamel.yaml" = "~0.15"
7777
scikit-learn = "^0.22"
@@ -80,7 +80,7 @@ python-telegram-bot = "^11.1"
8080
twilio = "~6.26"
8181
webexteamssdk = "~1.1.1"
8282
mattermostwrapper = "~2.2"
83-
rocketchat_API = "==0.6.31"
83+
rocketchat_API = "~0.6.31"
8484
colorhash = "~1.0.2"
8585
pika = "~1.1.0"
8686
jsonschema = "~3.2"
@@ -91,20 +91,19 @@ rasa-sdk = "^1.7.0"
9191
colorclass = "~2.2"
9292
terminaltables = "~3.1.0"
9393
sanic = "~19.9.0"
94-
sanic-cors = "==0.9.9.post1"
95-
sanic-jwt = "==1.3.2"
94+
sanic-cors = "~0.9.9.post1"
95+
sanic-jwt = "~1.3.2"
9696
sanic-plugins-framework = "==0.8.2"
9797
cloudpickle = "~1.2.0"
9898
multidict = "^4.6"
9999
aiohttp = "~3.5"
100-
questionary = "==1.1.1"
100+
questionary = "~1.1.1"
101101
prompt-toolkit = "^2.0"
102102
python-socketio = "~4.4"
103103
python-engineio = "~3.11"
104104
pydot = "~1.4"
105105
async_generator = "~1.10"
106-
SQLAlchemy = "~=1.3.3"
107-
kafka-python = "^1.4"
106+
SQLAlchemy = "~1.3.3"
108107
sklearn-crfsuite = "~0.3"
109108
psycopg2-binary = "~2.8.2"
110109
PyJWT = "~1.7"
@@ -152,6 +151,7 @@ sphinx-autodoc-typehints = "==1.6.0"
152151
spacy = [ "spacy",]
153152
convert = [ "tensorflow_text",]
154153
transformers = [ "transformers",]
154+
kafka = [ "kafka-python",]
155155
full = [ "spacy", "tensorflow_text", "transformers", "jieba",]
156156
gh-release-notes = [ "pypandoc", "github3.py",]
157157

@@ -179,6 +179,10 @@ optional = true
179179
version = "==0.39"
180180
optional = true
181181

182+
[tool.poetry.dependencies.kafka-python]
183+
version = "^1.4"
184+
optional = true
185+
182186
[tool.poetry.dependencies.pymongo]
183187
version = "~3.8.0"
184188
extras = [ "tls", "srv",]

0 commit comments

Comments
 (0)
Please sign in to comment.