I’m trying to figure out how to properly build the containers in my localhost. The file course/composer/docker-compose.yml mentions the following:
version: '2.3'
## To Build The Repo: Execute the following command from directory ABOVE notebook repository
## Dev Environment: docker-compose build && docker-compose up -d
## Prod Environment: docker-compose -f docker-compose.yml -f docker-compose.deployment.yml build && ...
It also mentions that the frontend and assessment microservices share a volume, where the frontend writes a file, and the assessment microservice uses that to give credit.
This suggests a specific directory structure or setup for building. Could anyone confirm how to correctly build the container and run the services in this setup? Any specific directory I should be running the commands from?
lab:
container_name: jupyter-notebook-server
init: true
volumes: ## Allow /dli/task in container to reference ./notebooks/ in host
- ./notebooks/:/dli/task/
## ...
## Deliver your llm_client microservice
llm_client:
container_name: llm_client
volumes:
- ./notebooks/llm_client:/llm_client
ports:
- "9000:9000"
env_file:
- .env ## pass in your environment variable (i.e. NVIDIA_API_KEY)
## This file belongs ABOVE the notebooks directory
# COMPOSE_PROJECT_NAME=c-fx-15-v1
# DEV_NGINX_PORT=80
# DEV_ASSESSMENT_PORT=81
# NVIDIA_API_KEY=nvapi-... ## To be filled in
# ...
## Reverse-proxy (serving the front page) service
nginx:
image: nginx:1.15.12-alpine
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
- lab
Per the volume specification, ./notebooks as relative to the compose.yml file is the default directory which contains everything that should be accessible inside the lab environment. The later services also have files which need to be above ./notebooks to be accessible from the compose.ymls.