diff --git a/Dockerfile b/Dockerfile index 92bd75d..ed115d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,9 @@ RUN python3 -m pip install -r AQuery2/requirements.txt ENV IS_DOCKER_IMAGE=1 CXX=clang++-14 +# First run will build cache into image +RUN cd AQuery2 && python3 prompt.py + CMD cd AQuery2 && python3 prompt.py diff --git a/Makefile b/Makefile index dfabd47..30e57bb 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ MonetDB_LIB = MonetDB_INC = Threading = CXXFLAGS = --std=c++1z -OPTFLAGS = -O3 -DNDEBUG +OPTFLAGS = -O3 -DNDEBUG LINKFLAGS = -flto # + $(AQ_LINK_FLAG) SHAREDFLAGS = -shared FPIC = -fPIC diff --git a/README.md b/README.md index df2e038..5c66ddc 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,8 @@ There're multiple options to run AQuery on Windows. You can use the native toolc ### Docker: - Alternatively, you can also use docker to run AQuery. - Type `make docker` to build the docker image from scratch. - - For Arm-based Mac users, you would have to build and run the x86_64 docker image because MonetDB doesn't offer official binaries for arm64 Linux. + - For Arm-based Mac users, you would have to build and run the x86_64 docker image because MonetDB doesn't offer official binaries for arm64 Linux. (Run `docker buildx build --platform=linux/amd64 -t aquery .` instead of `make docker`) + - Finally run the image in **interactive** mode (`docker run -it --rm aquery`) ## Usage `python3 prompt.py` will launch the interactive command prompt. The server binary will be automatically rebuilt and started. #### Commands: diff --git a/prompt.py b/prompt.py index 3c0f221..4ad02f0 100644 --- a/prompt.py +++ b/prompt.py @@ -337,7 +337,8 @@ def prompt(running = lambda:True, next = lambda:input('> '), state = None): try: og_q : str = next() except EOFError: - continue + print('stdin inreadable, Exiting...') + exit(0) q = og_q.lower().strip() if False and q == 'exec': # generate build and run (AQuery Engine) state.cfg.backend_type = Backend_Type.BACKEND_AQuery.value diff --git a/server/utils.h b/server/utils.h index fd38cb3..3cd7b2a 100644 --- a/server/utils.h +++ b/server/utils.h @@ -11,4 +11,4 @@ inline const char* str(const T& v) { } #include -extern std::string base62uuid(int l = 6); \ No newline at end of file +extern std::string base62uuid(int l = 6);