github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/ext/etl/runtime/podspec.yaml (about)

     1  apiVersion: v1
     2  kind: Pod
     3  metadata:
     4    name: <NAME>
     5  spec:
     6    containers:
     7      - name: server
     8        image: aistorage/runtime_python:<TAG>
     9        imagePullPolicy: Always
    10        ports:
    11          - name: default
    12            containerPort: 80
    13        command: <COMMAND>
    14        env:
    15          - name: MOD_NAME
    16            value: code
    17          - name: FUNC_TRANSFORM
    18            value: <FUNC_TRANSFORM>
    19          - name: COMM_TYPE
    20            value: <COMM_TYPE>
    21          - name: CHUNK_SIZE
    22            value: <CHUNK_SIZE>
    23          - name: ARG_TYPE
    24            value: <ARG_TYPE>
    25          - name: FLAGS
    26            value: <FLAGS>
    27          - name: PYTHONPATH
    28            value: /runtime
    29        readinessProbe:
    30          httpGet:
    31            path: /health
    32            port: default
    33        volumeMounts:
    34          - name: code
    35            mountPath: "/code"
    36          - name: runtime
    37            mountPath: "/runtime"
    38    initContainers:
    39      - name: server-deps
    40        image: aistorage/runtime_python:<TAG>
    41        imagePullPolicy: IfNotPresent
    42        command:
    43          - 'sh'
    44          - '-c'
    45          - |
    46            echo "${AISTORE_CODE}" > /dst/code.py
    47            echo "${AISTORE_DEPS}" > /dst/requirements.txt
    48            pip install --target="/runtime" -r /dst/requirements.txt
    49        volumeMounts:
    50          - name: code
    51            mountPath: "/dst"
    52          - name: runtime
    53            mountPath: "/runtime"
    54    volumes:
    55      - name: code
    56        emptyDir: {}
    57      - name: runtime
    58        emptyDir: {}