diff --git a/docker/Dockerfile b/docker/Dockerfile index 42490d3..2a7d37c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,8 @@ FROM hpcaitech/colossalai:0.1.8 +# FROM energonai:lastest -RUN mkdir -p /workspace && cd /workspace && git clone https://github.com/hpcaitech/EnergonAI.git --recursive && cd EnergonAI && pip --no-cache-dir install -r requirements.txt && pip install . +WORKDIR /workspace -WORKDIR /workspace/EnergonAI +RUN mkdir -p /workspace && cd /workspace && git clone https://github.com/hpcaitech/EnergonAI.git --recursive && cd EnergonAI && pip --no-cache-dir install -r requirements.txt && pip install . -CMD ["./serve.sh"] \ No newline at end of file +CMD ["bash", "/workspace/EnergonAI/server.sh"] \ No newline at end of file diff --git a/test_query.sh b/test_query.sh new file mode 100644 index 0000000..3e5ba1d --- /dev/null +++ b/test_query.sh @@ -0,0 +1,9 @@ +set -x + +# Launch a docker container in this way +# docker run --gpus all --rm -it -p 8090:8020 -v /data:/data --ipc=host energonai:lastest + +# run this script in the host machine. +curl -X 'GET' \ + 'http://127.0.0.1:8090/run/It%27s%20my%20turn?max_seq_length=200' \ + -H 'accept: application/json'