{"_id":"58c563178dd02f0f006c2643","__v":0,"githubsync":"","user":"573592b84b0ab120000b7d44","version":{"_id":"58c10f5a2c3c720f00768b87","project":"5735936aafab441700723a50","__v":4,"createdAt":"2017-03-09T08:16:26.385Z","releaseDate":"2017-03-09T08:16:26.385Z","categories":["58c10f5a2c3c720f00768b88","58c10f5a2c3c720f00768b89","58c10f5a2c3c720f00768b8a","58c10f5a2c3c720f00768b8b","58c10f5a2c3c720f00768b8c","58c10f5a2c3c720f00768b8d","58c10f5a2c3c720f00768b8e","58c10f5a2c3c720f00768b8f","58c10f5a2c3c720f00768b90","58c10f5a2c3c720f00768b91","58c10f5a2c3c720f00768b92","58c10f5a2c3c720f00768b93","58c11574b36d8c0f006fda47","58c2cdcafc6eed3900e97640","58c2ce8afc6eed3900e97663"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"parentDoc":null,"category":{"_id":"58c10f5a2c3c720f00768b8a","version":"58c10f5a2c3c720f00768b87","__v":0,"project":"5735936aafab441700723a50","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-05-13T09:49:29.176Z","from_sync":false,"order":4,"slug":"quick-start","title":"Importing data"},"project":"5735936aafab441700723a50","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-03-12T15:02:47.830Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"docker run --rm \\\\\\n           --name easy-import-operophtera_brumata_v1_core_32_85_1 \\\\\\n           --link genomehubs-mysql \\\\\\n           -v ~/demo/genomehubs-import/import/conf:/import/conf \\\\\\n           -v ~/demo/genomehubs-import/import/data:/import/data \\\\\\n           -v ~/demo/genomehubs-import/download/data:/import/download \\\\\\n           -v ~/demo/genomehubs-import/blast/data:/import/blast \\\\\\n           -e DATABASE=operophtera_brumata_v1_core_32_85_1 \\\\\\n           -e FLAGS=\\\"-s -p -g -e -j -i\\\" \\\\\\n           genomehubs/easy-import:latest\",\n      \"language\": \"text\",\n      \"name\": \"docker run command\"\n    }\n  ]\n}\n[/block]\nThe environment variables (`-e` are most likely to need changing between runs as these specify the DATABASE to be used and FLAGS specify which scripts to run.\n\nThe easy import container must be able to access a MySQL database server, the `--link` option sets up a link to a docker container running MySQL and allows this container name to be given as the database host in the configuration files\n\nFour directories are mounted in this example:\n\n- `/import/conf` must contain the configuration files, when exporting files from a mirrored database the database-specific configuration file is optional but database connection settings must be given in either `default.ini` or `overwrite.ini`\n- `/import/data` is used as a temporary location for downloaded and processed files and error logs for each of the EasyImport scripts, mounting this directory allows files to be reused and is useful for debugging\n- `/import/download` is the directory to which files will be exported for hosting with the h5ai container, this need only be mounted when running the export scripts.\n- `/import/blast` is the directory to which files will be exported for hosting with the SequenceServer container, this need only be mounted when running the export_sequences script.","excerpt":"","slug":"running-the-easyimport-container","type":"basic","title":"Running the EasyImport container"}

Running the EasyImport container


[block:code] { "codes": [ { "code": "docker run --rm \\\n --name easy-import-operophtera_brumata_v1_core_32_85_1 \\\n --link genomehubs-mysql \\\n -v ~/demo/genomehubs-import/import/conf:/import/conf \\\n -v ~/demo/genomehubs-import/import/data:/import/data \\\n -v ~/demo/genomehubs-import/download/data:/import/download \\\n -v ~/demo/genomehubs-import/blast/data:/import/blast \\\n -e DATABASE=operophtera_brumata_v1_core_32_85_1 \\\n -e FLAGS=\"-s -p -g -e -j -i\" \\\n genomehubs/easy-import:latest", "language": "text", "name": "docker run command" } ] } [/block] The environment variables (`-e` are most likely to need changing between runs as these specify the DATABASE to be used and FLAGS specify which scripts to run. The easy import container must be able to access a MySQL database server, the `--link` option sets up a link to a docker container running MySQL and allows this container name to be given as the database host in the configuration files Four directories are mounted in this example: - `/import/conf` must contain the configuration files, when exporting files from a mirrored database the database-specific configuration file is optional but database connection settings must be given in either `default.ini` or `overwrite.ini` - `/import/data` is used as a temporary location for downloaded and processed files and error logs for each of the EasyImport scripts, mounting this directory allows files to be reused and is useful for debugging - `/import/download` is the directory to which files will be exported for hosting with the h5ai container, this need only be mounted when running the export scripts. - `/import/blast` is the directory to which files will be exported for hosting with the SequenceServer container, this need only be mounted when running the export_sequences script.