Browse Source

修改测试gpu docker配置

root 1 year ago
parent
commit
1eeffbd54e
1 changed files with 25 additions and 25 deletions
  1. 25 25
      deploy/docker_compose/docker-compose.yaml

+ 25 - 25
deploy/docker_compose/docker-compose.yaml

@@ -1,27 +1,27 @@
 # version: '3.7'
-# services:
-#   app:
-#     build:
-#       context: .
-#       args:
-#         - work_dir=/app
-#     environment:
-#       - FLASK_APP_PATH=/app/server.py
-#       - FLASK_PORT=5000
-#     working_dir: /app
-#     volumes:
-#       - './:/app'
-#     ports:
-#       - 5000:5000
-
 services:
-  test:
-    image: nvidia/cuda:10.2-base
-    command: nvidia-smi
-    deploy:
-      resources:
-        reservations:
-          devices:
-            - driver: nvidia
-              count: 1
-              capabilities: [gpu]
+  app:
+    build:
+      context: .
+      args:
+        - work_dir=/app
+    environment:
+      - FLASK_APP_PATH=/app/server.py
+      - FLASK_PORT=5000
+    working_dir: /app
+    volumes:
+      - './:/app'
+    ports:
+      - 5000:5000
+
+# services:
+#   test:
+#     image: nvidia/cuda:10.2-base
+#     command: nvidia-smi
+#     deploy:
+#       resources:
+#         reservations:
+#           devices:
+#             - driver: nvidia
+#               count: 1
+#               capabilities: [gpu]