Skip to content

Commit

Permalink
Dockerfiles updates and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alwx committed Feb 26, 2020
1 parent 38ac044 commit 5c2a737
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 29 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ FROM python:3.6-slim
# copy everything from /opt
COPY --from=python_builder /opt/venv /opt/venv
COPY --from=python_builder /app /app

# make sure we use the virtualenv
ENV PATH="/opt/venv/bin:$PATH"

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

# Create a volume for temporary data
# create a volume for temporary data
VOLUME /tmp

# change shell
Expand Down
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,29 @@ also be asked to sign a


## Development Internals

### Building from source

Rasa uses Poetry for packaging and dependency management. If you want to build it from source,
you have to install Poetry first. This is how it can be done:

```
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3
```

There are several other ways to install Poetry. Please, follow
[the official guide](https://python-poetry.org/docs/#installation) to see all possible options.

To install dependencies and `rasa` itself in editable mode execute
```
make install
```

### Running and changing the documentation
To build & edit the docs, first install all necessary dependencies:

First of all, install all the required dependencies:
```
poetry install
make install
```

After the installation has finished, you can run and view the documentation
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile_full
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ FROM python:3.6-slim
# copy everything from /opt
COPY --from=python_builder /opt/venv /opt/venv
COPY --from=python_builder /app /app

# make sure we use the virtualenv
ENV PATH="/opt/venv/bin:$PATH"

# update permissions & change user to not run as root
Expand Down
4 changes: 3 additions & 1 deletion docker/Dockerfile_pretrained_embeddings_mitie_en
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@ FROM python:3.6-slim
# copy everything from /opt
COPY --from=python_builder /opt/venv /opt/venv
COPY --from=python_builder /app /app

# make sure we use the virtualenv
ENV PATH="/opt/venv/bin:$PATH"

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

# Create a volume for temporary data
# create a volume for temporary data
VOLUME /tmp

# change shell
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile_pretrained_embeddings_spacy_de
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ FROM python:3.6-slim
# copy everything from /opt
COPY --from=python_builder /opt/venv /opt/venv
COPY --from=python_builder /app /app

# make sure we use the virtualenv
ENV PATH="/opt/venv/bin:$PATH"

# update permissions & change user to not run as root
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile_pretrained_embeddings_spacy_en
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ FROM python:3.6-slim
# copy everything from /opt
COPY --from=python_builder /opt/venv /opt/venv
COPY --from=python_builder /app /app

# make sure we use the virtualenv
ENV PATH="/opt/venv/bin:$PATH"

# update permissions & change user to not run as root
Expand Down
30 changes: 15 additions & 15 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 14 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ numpy = "^1.16"
scipy = "^1.4.1"
absl-py = "~0.9"
apscheduler = "~3.6"
tqdm = "==4.31.0"
networkx = "==2.4.0"
fbmessenger = "==6.0.0"
pykwalify = "==1.7.0"
tqdm = "~4.31.0"
networkx = "~2.4.0"
fbmessenger = "~6.0.0"
pykwalify = "~1.7.0"
coloredlogs = "^10.0"
"ruamel.yaml" = "~0.15"
scikit-learn = "^0.22"
Expand All @@ -80,7 +80,7 @@ python-telegram-bot = "^11.1"
twilio = "~6.26"
webexteamssdk = "~1.1.1"
mattermostwrapper = "~2.2"
rocketchat_API = "==0.6.31"
rocketchat_API = "~0.6.31"
colorhash = "~1.0.2"
pika = "~1.1.0"
jsonschema = "~3.2"
Expand All @@ -91,20 +91,19 @@ rasa-sdk = "^1.7.0"
colorclass = "~2.2"
terminaltables = "~3.1.0"
sanic = "~19.9.0"
sanic-cors = "==0.9.9.post1"
sanic-jwt = "==1.3.2"
sanic-cors = "~0.9.9.post1"
sanic-jwt = "~1.3.2"
sanic-plugins-framework = "==0.8.2"
cloudpickle = "~1.2.0"
multidict = "^4.6"
aiohttp = "~3.5"
questionary = "==1.1.1"
questionary = "~1.1.1"
prompt-toolkit = "^2.0"
python-socketio = "~4.4"
python-engineio = "~3.11"
pydot = "~1.4"
async_generator = "~1.10"
SQLAlchemy = "~=1.3.3"
kafka-python = "^1.4"
SQLAlchemy = "~1.3.3"
sklearn-crfsuite = "~0.3"
psycopg2-binary = "~2.8.2"
PyJWT = "~1.7"
Expand Down Expand Up @@ -152,6 +151,7 @@ sphinx-autodoc-typehints = "==1.6.0"
spacy = [ "spacy",]
convert = [ "tensorflow_text",]
transformers = [ "transformers",]
kafka = [ "kafka-python",]
full = [ "spacy", "tensorflow_text", "transformers", "jieba",]
gh-release-notes = [ "pypandoc", "github3.py",]

Expand Down Expand Up @@ -179,6 +179,10 @@ optional = true
version = "==0.39"
optional = true

[tool.poetry.dependencies.kafka-python]
version = "^1.4"
optional = true

[tool.poetry.dependencies.pymongo]
version = "~3.8.0"
extras = [ "tls", "srv",]
Expand Down

0 comments on commit 5c2a737

Please sign in to comment.