3_image_test.sh 518 Bytes
Newer Older
1
#!/bin/bash
2
TARGET_DIR=gpu-base-image-test
chenpangpang's avatar
chenpangpang committed
3
4
5
6
7
8
9
10
11
12
13
# 检查是否提供了输入参数
if [ -z "$1" ]; then
  echo "please set input image"
  exit 1
fi

if [[ "$1" == *"pytorch"* ]]; then \
  docker run --rm --platform=linux/amd64 --gpus all -v ./$TARGET_DIR:/workspace --workdir /workspace/pytorch/stable-diffusion-v1-4 $1 python infer.py; fi

if [[ "$1" == *"tensorflow"* ]]; then \
  docker run --rm --platform=linux/amd64 --gpus all -v ./$TARGET_DIR:/workspace --workdir /workspace/tensorflow/mnist $1 python train.py; fi