From 13571734dac352e836508f89b308c3e9e4ea1b1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leon=20Michel=20Gori=C3=9Fen?=
 <leon.gorissen@llt.rwth-aachen.de>
Date: Fri, 24 May 2024 09:36:43 +0200
Subject: [PATCH] For development spin up only container

---
 docker-compose.yaml                           | 156 +++++++++---------
 .../Dockerfile.dynamics_learning              |   2 +-
 2 files changed, 82 insertions(+), 76 deletions(-)

diff --git a/docker-compose.yaml b/docker-compose.yaml
index 3cbc851..36c8bdc 100755
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -1,80 +1,80 @@
 services:
-###########################frankalockunlock#############################
-  frankalockunlock:
-    build:
-      context: .
-      dockerfile: ./franka_lock_unlock/Dockerfile.frankalockunlock
-    environment:
-      - FRANKA_PASSWORD=${FRANKA_PASSWORD}
-    stop_grace_period: 1m
-    deploy:
-      resources:
-        limits:
-          cpus: '2' # Limit to half a CPU
-          memory: 100M  # Limit to 256 megabytes
-        reservations:
-          cpus: '1'  # Reserve a quarter of a CPU
-          memory: 50M  # Reserve 128 megabytes
-    container_name: frankalockunlock # Sets a custom name for the container
-    stdin_open: true # Keeps the container's standard input open (similar to 'docker run -i')
-    tty: true # Allocates a pseudo-TTY (like 'docker run -t'), useful for interactive shells
-    network_mode: host
-    # network_mode: pandavlan # Uses the host's network stack, not creating a separate network namespace
-    privileged: true
+# ###########################frankalockunlock#############################
+#   frankalockunlock:
+#     build:
+#       context: .
+#       dockerfile: ./franka_lock_unlock/Dockerfile.frankalockunlock
+#     environment:
+#       - FRANKA_PASSWORD=${FRANKA_PASSWORD}
+#     stop_grace_period: 1m
+#     deploy:
+#       resources:
+#         limits:
+#           cpus: '2' # Limit to half a CPU
+#           memory: 100M  # Limit to 256 megabytes
+#         reservations:
+#           cpus: '1'  # Reserve a quarter of a CPU
+#           memory: 50M  # Reserve 128 megabytes
+#     container_name: frankalockunlock # Sets a custom name for the container
+#     stdin_open: true # Keeps the container's standard input open (similar to 'docker run -i')
+#     tty: true # Allocates a pseudo-TTY (like 'docker run -t'), useful for interactive shells
+#     network_mode: host
+#     # network_mode: pandavlan # Uses the host's network stack, not creating a separate network namespace
+#     privileged: true
 
-############################ros#########################################
-  ros:
-    build:
-      context: .  # Sets the build context to the catkin_ws directory
-      dockerfile: ./catkin_ws/Dockerfile.ros # Specifies the Dockerfile to use for building the image
-    stop_grace_period: 30s
-    deploy:
-      resources:
-        limits:
-          cpus: '12' # Limit to half a CPU
-          memory: 8G  # Limit to 256 megabytes
-        reservations:
-          cpus: '8'  # Reserve a quarter of a CPU
-          memory: 6G  # Reserve 128 megabytes
-    container_name: ros # Sets a custom name for the container
-    stdin_open: true # Keeps the container's standard input open (similar to 'docker run -i')
-    tty: true # Allocates a pseudo-TTY (like 'docker run -t'), useful for interactive shells
-    #command: /bin/bash # Overrides the default command to start an interactive bash shell
-    cap_add:
-      - SYS_NICE # Grants the container the CAP_SYS_NICE capability for priority management
-    ulimits:
-      rtprio: 99 # Sets the realtime priority limit
-      rttime: -1 # Sets the realtime CPU time limit to unlimited
-      memlock: 8428281856 # Sets the maximum locked-in-memory address space (in bytes)
-    network_mode: host
-    # network_mode: pandavlan # Uses the host's network stack, not creating a separate network namespace
-    privileged: true # Grants the container extended privileges, similar to running as root on the host
-    volumes:
-      - "/tmp/.X11-unix:/tmp/.X11-unix"
-    environment:
-      - DISPLAY=unix${DISPLAY}
+# ############################ros#########################################
+#   ros:
+#     build:
+#       context: .  # Sets the build context to the catkin_ws directory
+#       dockerfile: ./catkin_ws/Dockerfile.ros # Specifies the Dockerfile to use for building the image
+#     stop_grace_period: 30s
+#     deploy:
+#       resources:
+#         limits:
+#           cpus: '12' # Limit to half a CPU
+#           memory: 8G  # Limit to 256 megabytes
+#         reservations:
+#           cpus: '8'  # Reserve a quarter of a CPU
+#           memory: 6G  # Reserve 128 megabytes
+#     container_name: ros # Sets a custom name for the container
+#     stdin_open: true # Keeps the container's standard input open (similar to 'docker run -i')
+#     tty: true # Allocates a pseudo-TTY (like 'docker run -t'), useful for interactive shells
+#     #command: /bin/bash # Overrides the default command to start an interactive bash shell
+#     cap_add:
+#       - SYS_NICE # Grants the container the CAP_SYS_NICE capability for priority management
+#     ulimits:
+#       rtprio: 99 # Sets the realtime priority limit
+#       rttime: -1 # Sets the realtime CPU time limit to unlimited
+#       memlock: 8428281856 # Sets the maximum locked-in-memory address space (in bytes)
+#     network_mode: host
+#     # network_mode: pandavlan # Uses the host's network stack, not creating a separate network namespace
+#     privileged: true # Grants the container extended privileges, similar to running as root on the host
+#     volumes:
+#       - "/tmp/.X11-unix:/tmp/.X11-unix"
+#     environment:
+#       - DISPLAY=unix${DISPLAY}
 
-###########################coscine######################################
-  coscine:
-      build:
-        context: .  # Sets the build context to the current directory
-        dockerfile: ./coscine_watchdog/Dockerfile.coscine # Specifies the Dockerfile to use for building the image
-      environment:
-      - COSCINE_API_TOKEN=${COSCINE_API_TOKEN}
-      deploy:
-        resources:
-          limits:
-            cpus: '2' # Limit to half a CPU
-            memory: 2G  # Limit to 256 megabytes
-          reservations:
-            cpus: '1'  # Reserve a quarter of a CPU
-            memory: 1G  # Reserve 128 megabytes
-      container_name: coscine # Sets a custom name for the container
-      stdin_open: true # Keeps the container's standard input open (similar to 'docker run -i')
-      tty: true # Allocates a pseudo-TTY (like 'docker run -t'), useful for interactive shells
-      #command: /bin/bash # Overrides the default command to start an interactive bash shell
-      network_mode: host
-      # network_mode: pandavlan # Uses the host's network stack, not creating a separate network namespace
+# ###########################coscine######################################
+#   coscine:
+#       build:
+#         context: .  # Sets the build context to the current directory
+#         dockerfile: ./coscine_watchdog/Dockerfile.coscine # Specifies the Dockerfile to use for building the image
+#       environment:
+#       - COSCINE_API_TOKEN=${COSCINE_API_TOKEN}
+#       deploy:
+#         resources:
+#           limits:
+#             cpus: '2' # Limit to half a CPU
+#             memory: 2G  # Limit to 256 megabytes
+#           reservations:
+#             cpus: '1'  # Reserve a quarter of a CPU
+#             memory: 1G  # Reserve 128 megabytes
+#       container_name: coscine # Sets a custom name for the container
+#       stdin_open: true # Keeps the container's standard input open (similar to 'docker run -i')
+#       tty: true # Allocates a pseudo-TTY (like 'docker run -t'), useful for interactive shells
+#       #command: /bin/bash # Overrides the default command to start an interactive bash shell
+#       network_mode: host
+#       # network_mode: pandavlan # Uses the host's network stack, not creating a separate network namespace
 
 #########################dynamics_learning##############################
   dynamics_learning:
@@ -95,4 +95,10 @@ services:
         hard: -1
       stack:
         soft: 67108864
-        hard: 67108864
\ No newline at end of file
+        hard: 67108864
+    container_name: dynamics_learning # Sets a custom name for the container
+    stdin_open: true # Keeps the container's standard input open (similar to 'docker run -i')
+    tty: true # Allocates a pseudo-TTY (like 'docker run -t'), useful for interactive shells
+    network_mode: host
+    volumes:
+      - /home/lgorissen/git/franka_wwl_demonstrator:/app
\ No newline at end of file
diff --git a/dynamics_learning/Dockerfile.dynamics_learning b/dynamics_learning/Dockerfile.dynamics_learning
index d79be4c..0e15b69 100644
--- a/dynamics_learning/Dockerfile.dynamics_learning
+++ b/dynamics_learning/Dockerfile.dynamics_learning
@@ -2,7 +2,7 @@ FROM nvcr.io/nvidia/tensorflow:24.04-tf2-py3
 
 WORKDIR /app
 
-COPY . .
+# COPY . .
 
 # Make entrypoint executeable
 RUN chmod +x /app/dynamics_learning/entrypoint.sh
-- 
GitLab