-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added docker build and run targets to the makefile, plus Dockerfile and
Docker ignore, plus updated the README a little.
- Loading branch information
1 parent
e08100d
commit 203b5f2
Showing
6 changed files
with
90 additions
and
7 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,24 @@ | ||
# Standard | ||
__pycache__ | ||
*.pyc | ||
*.pyo | ||
*.pyd | ||
.Python | ||
env | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
.tox | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.log | ||
.git | ||
.mypy_cache | ||
.pytest_cache | ||
.hypothesis | ||
|
||
# Custom | ||
data/ |
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
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,11 @@ | ||
FROM python:3.10-slim | ||
|
||
RUN apt-get update && apt-get install -y python3-tk && pip install --upgrade pip | ||
|
||
WORKDIR /app | ||
|
||
COPY . ./ | ||
|
||
RUN pip install -r requirements.txt | ||
|
||
CMD ["python", "main.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,30 @@ | ||
OPENAI_API_KEY := <your key here> | ||
GOOSEAI_API_KEY := <your key here (you only need one of these)> | ||
AI21_API_KEY := <your key here> | ||
|
||
|
||
IMAGE := loom | ||
|
||
SHELL = /bin/sh | ||
|
||
CURRENT_UID := $(shell id -u) | ||
CURRENT_GID := $(shell id -g) | ||
|
||
export CURRENT_UID | ||
export CURRENT_GID | ||
|
||
install: | ||
echo "Make sure you are using python version 3.9.13 or over" | ||
sudo apt install python-tk | ||
|
||
build: | ||
docker build -t $(IMAGE) . | ||
|
||
run: | ||
docker run -it --rm \ | ||
-v $(PWD)/data:/app/data \ | ||
-v $(PWD)/examples:/app/examples \ | ||
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \ | ||
-e DISPLAY=$(DISPLAY) \ | ||
-u=$(CURRENT_UID):$(CURRENT_GID) \ | ||
$(IMAGE) |
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
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