running server inside a docker container build it docker build . --tag my/torch run it (some opts not necessary here) docker run --expose 9000 --network="host" -v $PWD:/workspace/ --gpus all -it my/torch run server python3 flask_server.py