Emily CLI Documentation
Release-v3.0.6Emily combines the powers of Python and Docker to build stable and consistent machine learning and datascience python environments. Emily is useful for large cross-team project development as well as for simply running a single jupyter notebook or python script.
Downloademily@v3.0.6
See earlier versions
$ emily configuration add compose external [options]
Add an external Docker network configuration to your project. External Docker networks allows your project containers to communicate with other containers (e.g. other Emily services) that have been configured with the same external network and are running on the same host.
$ emily configuration add compose external
? Emily: Choose a project
(Use arrow keys, confirm with ENTER)
…
> M9VHKD - my-project
AB82JD - movie-recommender
· M9VHKD - my-project
√ Emily: Please enter the configuration name:
· staging
√ Emily: Please enter the external network name:
· emily-shared-network
Emily: External network configuration "staging" added to project
my-project (M9VHKD).
Created:
- /my/projects/my-project/staging/docker-compose.external.yml
Docker Compose External Network configuration
The emily configuration add compose external
command adds the external network Docker Compose configuration to your project.
This configuration adds an external Docker network to your Docker Compose specification by means of the configuration file docker-compose.external.yml
:
version: "3" services: emily-my-project-m9vhkd: networks: - emily-shared-network networks: emily-shared-network: external: true
This is useful if you have multiple separate Emily projects that need to communicate together.
If you run emily configuration add compose external
on two separate projects and specify the same network name, those two services
will be able to communicate with each other on a closed network when running locally or remotely.
For example, say we have two Emily projects:
user-service
auth-service
We can add the same external network configuration to both projects:
$ emily configuration add compose external
--project user-service
--network internal-backend-network
$ emily configuration add compose external
--project auth-service
--network internal-backend-network
Now either project can communicate with the other over the shared network through HTTP calls against their
service name as specified in the docker-compose.*.yml
configuration files:
import httpx ## From the user-service httpx.get('http://emily-auth-service-ksj72d:4242/api') ## From the auth-service httpx.get('http://emily-user-service-uaa88i:4242/api')