-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker vn #553
base: staging
Are you sure you want to change the base?
Docker vn #553
Changes from all commits
3c386fa
7947ef8
f85585c
4eb5504
5409cfd
6b43351
2ec3fc2
a1d8f15
8645c1a
ff31b57
90c77e1
8c49949
e60c5ee
94bf397
20e1eec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
rajatkapoordfci marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -200,3 +200,44 @@ From the _root_ directory of the repository: | |||||||||||||||||||||||||||||||||
```shell | ||||||||||||||||||||||||||||||||||
pytest tests/ | ||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
## Docker Setup: | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||
This section deals with setting up Variation Normalizer's backend dependencies via Docker. You must have Docker installed for this section. See more [here](https://docs.docker.com/engine/install/). | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
To create a new Docker network, use the [docker network create](https://docs.docker.com/reference/cli/docker/network/create/) command. For example, `docker network create tulip-net` | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
## SeqRepo | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be a subheading
Suggested change
|
||||||||||||||||||||||||||||||||||
Variation Normalizer depends on [Biocommons SeqRepo](https://github.com/biocommons/biocommons.seqrepo). It is recommended to have the image as a volume attached to SeqRepo since the size exceeds 10 GB and can take a while to download. | ||||||||||||||||||||||||||||||||||
1. Pull the image from Docker Hub Repository: | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
```shell | ||||||||||||||||||||||||||||||||||
docker pull biocommons/seqrepo | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
## UTA | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be a subheading
Suggested change
|
||||||||||||||||||||||||||||||||||
The Postgres UTA instance is another dependancy required for Variation Normalizer. To setup Container for UTA postgres Db instance. Follow the following steps: | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||
a.) Pull the image from Docker Hub Repository by typing following command in terminal. | ||||||||||||||||||||||||||||||||||
Set the uta_v env variable by typing command uta_v=<"name of the version>. For eg uta_v=uta_20210129b. | ||||||||||||||||||||||||||||||||||
Command : docker pull biocommons/uta:$uta_v | ||||||||||||||||||||||||||||||||||
b.) Once the image is downnloaded, Start the container with the command : | ||||||||||||||||||||||||||||||||||
docker run | ||||||||||||||||||||||||||||||||||
-d | ||||||||||||||||||||||||||||||||||
-e POSTGRES_PASSWORD=some-password-that-you-make-up | ||||||||||||||||||||||||||||||||||
-v /tmp:/tmp | ||||||||||||||||||||||||||||||||||
-v uta_vol:/var/lib/postgresql/data | ||||||||||||||||||||||||||||||||||
--name $uta_v | ||||||||||||||||||||||||||||||||||
--net=<"name of the network> \ | ||||||||||||||||||||||||||||||||||
biocommons/uta:$uta_v | ||||||||||||||||||||||||||||||||||
Comment on lines
+218
to
+229
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Where b.) Once the image is downloaded, run the following: docker run
-d
-e POSTGRES_PASSWORD=some-password-that-you-make-up
-v /tmp:/tmp
-v uta_vol:/var/lib/postgresql/data
--name $uta_v
--net=<"name of the network> \
biocommons/uta:$uta_v
|
||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
### DynamoDB | ||||||||||||||||||||||||||||||||||
AWS provides a docker image for the local instance. The DynamoDB local instance requires credentials (`AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`). You can provide dummy values for these if you do not have an AWS account. | ||||||||||||||||||||||||||||||||||
1. Pull the image from Docker Hub repository and start the container: | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
```shell | ||||||||||||||||||||||||||||||||||
docker run --net tulip-net -d --name dynamodb -p 8001:8001 amazon/dynamodb-local:1.18.0 -jar DynamoDBLocal.jar -port 8001 | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
### Running the Dockerfile locally | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
1. Build the image from the docker file: | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
```shell | ||||||||||||||||||||||||||||||||||
docker build -t variation-normalization . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should consider having these as ARGs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These values are required during container runtime as well. It would be better to continue with ENV unless we are planning for build time customisation.