forked from stitionai/devika
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added Dockerfile/Compose support w/ astral rust python pkg mgr
- Loading branch information
1 parent
4c7dc9d
commit 8e252c9
Showing
3 changed files
with
101 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,25 @@ | ||
FROM debian:12 | ||
|
||
# setting up os env | ||
USER root | ||
WORKDIR /home/nonroot/client | ||
RUN groupadd -r nonroot && useradd -r -g nonroot -d /home/nonroot/client -s /bin/bash nonroot | ||
|
||
# install node js | ||
RUN apt-get update && apt-get upgrade | ||
RUN apt-get install -y build-essential software-properties-common curl sudo wget | ||
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - | ||
RUN apt-get install nodejs | ||
|
||
# copying devika app client only | ||
COPY ui /home/nonroot/client/ | ||
COPY src /home/nonroot/client/ | ||
COPY config.toml /home/nonroot/client/ | ||
|
||
RUN npm install && npm upgrade | ||
RUN chown -R nonroot:nonroot /home/nonroot/client | ||
|
||
USER nonroot | ||
WORKDIR /home/nonroot/client | ||
|
||
ENTRYPOINT [ "npm", "run", "dev" ] |
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,36 @@ | ||
FROM debian:12 | ||
|
||
# setting up os env | ||
USER root | ||
WORKDIR /home/nonroot/devika | ||
RUN groupadd -r nonroot && useradd -r -g nonroot -d /home/nonroot/devika -s /bin/bash nonroot | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
|
||
# setting up python3 | ||
RUN apt-get update && apt-get upgrade | ||
RUN apt-get install -y build-essential software-properties-common curl sudo wget | ||
RUN apt-get install -y python3 python3-pip | ||
RUN curl -fsSL https://astral.sh/uv/install.sh | sudo -E bash - | ||
RUN export PATH=$PATH:$HOME/.cargo/bin | ||
RUN echo $PATH | ||
RUN $HOME/.cargo/bin/uv venv | ||
RUN python3 -V && pip3 -V | ||
|
||
# copy devika python engine only | ||
COPY requirements.txt /home/nonroot/devika/ | ||
RUN $HOME/.cargo/bin/uv pip install -r requirements.txt | ||
RUN $HOME/.cargo/bin/uv pip install flask flask-cors | ||
|
||
COPY src /home/nonroot/devika/src | ||
COPY config.toml /home/nonroot/devika/ | ||
COPY devika.py /home/nonroot/devika/ | ||
RUN ls | ||
|
||
RUN chown -R nonroot:nonroot /home/nonroot/devika | ||
USER nonroot | ||
|
||
WORKDIR /home/nonroot/devika | ||
|
||
ENTRYPOINT [ "python3", "devika.py" ] |
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,40 @@ | ||
version: "3.9" | ||
|
||
services: | ||
llama2-llm-service: | ||
image: ollama/ollama:latest | ||
networks: | ||
- devika-subnetwork | ||
expose: | ||
- 11434 | ||
ports: | ||
- 11434:11434 | ||
|
||
devika-backend-engine: | ||
build: | ||
context: . | ||
dockerfile: devika.dockerfile | ||
depends_on: | ||
- llama2-llm-service | ||
expose: | ||
- 1337 | ||
ports: | ||
- 1337:1337 | ||
networks: | ||
- devika-subnetwork | ||
|
||
devika-frontend-app: | ||
build: | ||
context: . | ||
dockerfile: app.dockerfile | ||
depends_on: | ||
- llama2-llm-service | ||
expose: | ||
- 3000 | ||
ports: | ||
- 3000:3000 | ||
networks: | ||
- devika-subnetwork | ||
|
||
networks: | ||
devika-subnetwork: |