Skip to content

Instantly share code, notes, and snippets.

@ald2004
Last active February 22, 2023 08:02
Show Gist options
  • Save ald2004/9846c404c0d0362aa8a5bf093cd06968 to your computer and use it in GitHub Desktop.
Save ald2004/9846c404c0d0362aa8a5bf093cd06968 to your computer and use it in GitHub Desktop.
docker starter
server.sh
#!/bin/sh
cd /opt/yuanpu/aiplatform
uvicorn model_package:app --reload --port 43034 --host 0.0.0.0 2>&1 >> nohup.log
docker_start.sh
#! /bin/bash
rm ./nohup.out
docker rm -f $(docker ps -a -q --filter "name=aipackage")
#docker run --ipc=host --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 --gpus=1 --rm -p43034:43034 --name aipackage -v/opt:/opt --env PATH=${PATH}:/opt/yuanpu/aiplatform ubuntu:18.04-dev server.sh
docker run -d --ipc=host --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 --gpus=1 --rm -p43034:43034 --name aipackage -v/opt:/opt --env PATH=/opt/yuanpu/aiplatform:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --network host ubuntu:18.04-dev server.sh >> nohup.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment