Skip to content

Commit 5e84d68

Browse files
vjaganat90Vasu Jaganathsameeul
authored
docker_image and docker-compose for restapi (PolusAI#296)
* docker_image and docker-compose for restapi * Refactor Dockerfile * rename Docker file from debian to ubuntu --------- Co-authored-by: Vasu Jaganath <[email protected]> Co-authored-by: sameeul <[email protected]>
1 parent 131e4a8 commit 5e84d68

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

docker/Dockerfile_ubuntu_REST

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM ubuntu:jammy
2+
3+
RUN apt update && \
4+
apt install software-properties-common -y && \
5+
apt install curl -y && \
6+
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
7+
python3 get-pip.py && \
8+
apt autoremove -y && \
9+
rm -rf /var/lib/apt/lists/*
10+
11+
COPY . /workflow-inference-compiler
12+
WORKDIR /workflow-inference-compiler
13+
14+
RUN pip3 install /workflow-inference-compiler --no-cache-dir
15+
16+
# Then run the sophios REST API through port 3000
17+
EXPOSE 3000
18+
19+
CMD ["uvicorn", "sophios.api.http.restapi:app", "--host", "0.0.0.0", "--port", "3000"]

docker/docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: '0.0.1'
2+
services:
3+
fastapi-app:
4+
image: vjaganat90/sophios-rest-api:0.0.1
5+
ports:
6+
- "3000:3000"
7+
environment:
8+
- PATH=$PATH
9+
command: ["uvicorn", "sophios.api.http.restapi:app", "--host", "0.0.0.0", "--port", "3000"]

0 commit comments

Comments
 (0)