Skip to content

Commit

Permalink
make local run
Browse files Browse the repository at this point in the history
  • Loading branch information
levisingularity committed Jan 24, 2024
1 parent e2962bc commit 9b9d98a
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
env/
.vscode
docs
build
.github
__pycache__
.pytest_cache
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ DAS_DATABASE_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
DAS_DATABASE_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
PYTHONPATH=/app

HYPERON_DAS=
HYPERON_DAS_ATOMDB=

DAS_KNOWLEDGE_BASE=/data/samples/animals.metta
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ COPY ./scripts/initd.sh ./

COPY ./das-query-engine/ ./das-query-engine/

COPY .env ./

RUN chmod +x ./initd.sh && touch .gitignore

SHELL ["sh"]
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,13 @@ unit-tests-coverage:
integration-tests:
./scripts/run-tests.sh integration

pre-commit: unit-tests-coverage lint
pre-commit: unit-tests-coverage lint

run:
@docker compose up --build --force-recreate -d

stop:
@docker compose down

local-run:
@docker compose -f docker-compose.yaml -f docker-compose-local.yaml up --build --force-recreate -d
6 changes: 6 additions & 0 deletions docker-compose-local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: "3.9"

services:
openfaas:
volumes:
- /home/rafaellevi/.pyenv/versions/3.10.12/lib/python3.10/site-packages:/opt/repos
9 changes: 8 additions & 1 deletion scripts/initd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,12 @@ else
done
fi

faas-cli local-run --network host --watch
faas-cli build

docker run --name query-engine \
--network host \
--env-file .env \
-v /opt/repos:/opt/repos \
trueagi/das:v1.5.0-queryengine

#tail -f /dev/null

0 comments on commit 9b9d98a

Please sign in to comment.