From e34254a2af0d84eb267f2f09cf93d510653acb27 Mon Sep 17 00:00:00 2001 From: Denis Date: Mon, 17 Jul 2023 15:09:15 +0200 Subject: [PATCH] Add Dockerfile --- Dockerfile | 6 ++++++ README.md | 11 +++++++++++ main.py | 1 + 3 files changed, 18 insertions(+) create mode 100644 Dockerfile mode change 100644 => 100755 main.py diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..0a937342 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM python:3.10 +#RUN pip install dicee==0.0.4 +RUN pip3 install "pandas>=1.5.1" "torch>=2.0.0" "polars>=0.16.14" "scikit-learn>=1.2.2" "pyarrow>=11.0.0" "pytest>=7.2.2" "gradio>=3.23.0" "psutil>=5.9.4" "pytorch-lightning==1.6.4" "pykeen==1.10.1" "zstandard>=0.21.0" +WORKDIR /dicee +ADD . . +CMD ./main.py diff --git a/README.md b/README.md index 6b92f325..e3aefb96 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,17 @@ pyreverse dicee/trainer && dot -Tpng -x classes.dot -o trainer.png && eog traine ``` +## Docker +To build the Docker image: +``` +docker build -t dice-embeddings . +``` + +To test the Docker image: +``` +docker run --rm -v ~/.local/share/dicee/KGs:/dicee/KGs dice-embeddings ./main.py --model AConEx --embedding_dim 16 +``` + # Knowledge Graph Embedding Models
Details diff --git a/main.py b/main.py old mode 100644 new mode 100755 index bf78acbf..154a509c --- a/main.py +++ b/main.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 import json from dicee.executer import Execute import pytorch_lightning as pl