Table of Contents |
---|
t5memory was ported to work with Ubuntu 20.04 LTS. It uses Proxygen library(HTTP lib, supported by Facebook), which uses other dependencies, like
...
docker build -t translate5/t5memory .
This would pull t5memory repository from github and would build t5memory from last commit
Alternatively you can call the same command from the project's root directory, this would build t5memory from local files instead of repo, which could be used for development.
Run a single docker container with a specific version
Code Block | ||||
---|---|---|---|---|
| ||||
docker run -d --restart unless-stopped --name t5memory -p 127.0.0.1:4041:4040/tcp -v /home/translate5tmservice/.t5memory-in-docker:/root/.t5memory/MEM --entrypoint /root/t5memory translate5/t5memory --port=4040 --alsologtostderr=1 --v=0 |
The command and its parameters explained:
Command part | description | Multiple t5memory instances |
---|---|---|
docker run -d | Run the container detached, so in the background | |
--restart unless-stopped | Ensure that the container is restarted (f.e. after reboot) | |
--name t5memory | The label of the container | must be changed if multiple containers of t5memory should run. |
-p 127.0.0.1:4041:4040/tcp | The port mapping from where the internal port (4040) is mapped to on the host (127.0.0.1:4041) | must be changed if multiple containers of t5memory should run. |
-v /home/translate5tmservice/.t5memory-in-docker:/root/.t5memory/MEM | The data path on the host mapped into the container - this affects the TM storage and persistency! | should be changed if multiple containers of t5memory should run, there might be scenarios where multiple instances share the same files and therefore the same mapping |
--entrypoint /root/t5memory | The command which should be called in the container on startup | |
translate5/t5memory | The container image, with any version tag the latest image locally available is used. A version tag might by added here: translate5/t5memory:0.3.17 | When running multiple versions with different versions, version tag should be change accordingly. |
--port=4040 --alsologtostderr=1 --v=0 | The parameters passed to the command defined in --entrypoint, so direct t5memory parameters |
Update of the above running container
To update / change the image version of the above running container, do the following:
Code Block |
---|
docker stop t5memory # stops the running container
docker rm t5memory # removes the container - danger! If the data is not mapped via -v volumes parameters, the data is lost!
docker pull translate5/t5memory # updates the image to the latest version
# or to pull a specific version:
docker pull translate5/t5memory:0.3.17 # optionally pulls a specific version
# the same docker run as explained above, so by default:
docker run -d --restart unless-stopped --name t5memory -p 127.0.0.1:4041:4040/tcp -v /home/translate5tmservice/.t5memory-in-docker:/root/.t5memory/MEM --entrypoint /root/t5memory translate5/t5memory --port=4040 --alsologtostderr=1 --v=0 |