-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker_image and docker-compose for restapi (#296)
* docker_image and docker-compose for restapi * Refactor Dockerfile * rename Docker file from debian to ubuntu --------- Co-authored-by: Vasu Jaganath <vasu.jaganath@axleinfo.com> Co-authored-by: sameeul <sameeul@gmail.com>
- Loading branch information
1 parent
131e4a8
commit 5e84d68
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM ubuntu:jammy | ||
|
||
RUN apt update && \ | ||
apt install software-properties-common -y && \ | ||
apt install curl -y && \ | ||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ | ||
python3 get-pip.py && \ | ||
apt autoremove -y && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
COPY . /workflow-inference-compiler | ||
WORKDIR /workflow-inference-compiler | ||
|
||
RUN pip3 install /workflow-inference-compiler --no-cache-dir | ||
|
||
# Then run the sophios REST API through port 3000 | ||
EXPOSE 3000 | ||
|
||
CMD ["uvicorn", "sophios.api.http.restapi:app", "--host", "0.0.0.0", "--port", "3000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: '0.0.1' | ||
services: | ||
fastapi-app: | ||
image: vjaganat90/sophios-rest-api:0.0.1 | ||
ports: | ||
- "3000:3000" | ||
environment: | ||
- PATH=$PATH | ||
command: ["uvicorn", "sophios.api.http.restapi:app", "--host", "0.0.0.0", "--port", "3000"] |