Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker_image and docker-compose for restapi #296

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docker/Dockerfile_ubuntu_REST
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"]
9 changes: 9 additions & 0 deletions docker/docker-compose.yml
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"]
Loading