Browse Source

API adjustments.

scossu 10 months ago
parent
commit
102a5dfb02
3 changed files with 20 additions and 3 deletions
  1. 18 0
      Dockerfile
  2. 1 1
      cpython/py_graph.h
  3. 1 2
      profile.c

+ 18 - 0
Dockerfile

@@ -0,0 +1,18 @@
+FROM --platform=linux/amd64 archlinux:base-devel
+
+RUN pacman -Syu --noconfirm
+RUN pacman -S --noconfirm git xxhash lmdb re2c valgrind gdb graphviz
+
+WORKDIR /opt/lsup/lsup_rdf/src
+RUN git clone --recurse-submodules https://git.knowledgetx.com/scossu/lsup_rdf.git
+WORKDIR lsup_rdf
+
+RUN useradd --create-home -G wheel lsup
+RUN echo "%wheel ALL=(ALL:ALL) NOPASSWD:ALL" >| /etc/sudoers.d/wheel
+RUN chown -R lsup:lsup .
+
+USER lsup
+
+ENV LD_LIBRARY_PATH /opt/local/lsup
+
+CMD ["/usr/bin/bash"]

+ 1 - 1
cpython/py_graph.h

@@ -167,7 +167,7 @@ Graph_init (GraphObject *self, PyObject *args, PyObject *kwargs)
     }
 
     // TODO Move store creation fn and handle into a separate module.
-    LSUP_store *store = LSUP_store_new (store_type, NULL, 0);
+    LSUP_Store *store = LSUP_store_new (store_type, NULL, 0);
     if (sif->setup_fn) {
         if (sif->setup_fn(NULL, false) < LSUP_OK) {
             PyErr_SetString (

+ 1 - 2
profile.c

@@ -52,8 +52,7 @@ int main(int argc, char *argv[])
     log_info ("Time elapsed: %lf s", wallclock);
 
     log_info ("Inserting triples.");
-    LSUP_Graph *gr = LSUP_graph_new (
-            LSUP_iriref_new (NULL, NULL), LSUP_STORE_MDB, NULL, NULL, nt);
+    LSUP_Graph *gr = LSUP_graph_new (NULL, NULL, NULL);
     if (!gr) {
         log_error ("Error creating graph!");
         return -1;