forked from NVIDIA/GenerativeAIExamples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·89 lines (83 loc) · 2.86 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# SPDX-FileCopyrightText: Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version: '3.3'
name: cyber-dev-day
services:
cyber-dev-day:
build:
context: .
dockerfile: ./Dockerfile
args:
- MORPHEUS_CONTAINER=${MORPHEUS_CONTAINER:-nvcr.io/nvidia/morpheus/morpheus}
- MORPHEUS_CONTAINER_VERSION=${MORPHEUS_CONTAINER_VERSION:-v24.03.02-runtime}
target: jupyter
image: morpheus-cyber-dev-day-2
entrypoint: /workspace/entrypoint.sh
ports:
- "26302"
- "${JUPYTER_PORT:-8888}:${JUPYTER_PORT:-8888}"
working_dir: /workspace
command: jupyter-lab --no-browser --allow-root --ip='*' --port=${JUPYTER_PORT:-8888}
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [ gpu ]
networks:
- proxy
# Uncomment if the .env file issue is resolved: https://github.com/docker/compose/issues/9181#issuecomment-1996016211
# env_file:
# - path: .env
# required: "false"
environment:
- TERM=${TERM:-}
# Workaround until this is working: https://github.com/docker/compose/issues/9181#issuecomment-1996016211
- OPENAI_API_KEY=<BUILD_NV_API_KEY>
# Overwrite any environment variables in the .env file with URLs needed in the network
- OPENAI_API_BASE=https://integrate.api.nvidia.com/v1
- OPENAI_BASE_URL=https://integrate.api.nvidia.com/v1
volumes:
- .:/workspace
- build-cache:/workspace/.cache
- build-dir:/workspace/build-docker
cap_add:
- sys_nice
restart: always
proxy-cache:
image: nginx:1.23.4
ports:
- "81"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/template-variables.conf:/etc/nginx/templates/10-variables.conf.template:ro
- proxy-cache:/server_cache:rw
environment:
# Workaround until this is working: https://github.com/docker/compose/issues/9181#issuecomment-1996016211
- NGC_API_KEY=${NGC_API_KEY:-CYBER_DEV_DAY}
- NGC_ORG_ID=${NGC_ORG_ID:-CYBER_DEV_DAY}
- NVIDIA_API_KEY=${NVIDIA_API_KEY:-nvapi-CYBER_DEV_DAY}
networks:
- proxy
networks:
proxy:
driver: bridge
volumes:
proxy-cache:
driver: local
build-cache:
driver: local
build-dir:
driver: local