File size: 1,137 Bytes
42cc6d2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# High-Performance Docker Compose configuration
#
# Use this overlay for large-scale deployments with optimizations for:
# - High parallelism (64+ instances)
# - Shared memory optimization
# - Resource allocation tuning
#
# Usage:
#   docker-compose -f docker-compose.yml -f docker-compose.hpc.yml up --scale android-env=64

version: '3.8'

services:
  android-env:
    # High-performance optimizations
    environment:
      # Use shared memory for zero-copy observations
      - ANDROID_USE_SHARED_MEMORY=true
      # Higher quality since we have resources
      - ANDROID_IMAGE_QUALITY=95

    # Resource allocation for parallel instances
    deploy:
      resources:
        limits:
          cpus: '4'
          memory: 8G
        reservations:
          cpus: '2'
          memory: 6G

      # Placement constraints (optional - use specific nodes)
      # placement:
      #   constraints:
      #     - node.labels.type == hpc

    # Shared memory size for IPC
    shm_size: '2gb'

    # Privileged mode for better KVM access (use with caution)
    # privileged: true

    # CPU affinity for NUMA optimization
    # cpuset: "0-3"