Optimize Docker

This commit is contained in:
2022-09-29 04:41:28 +08:00
parent 09aa73c346
commit 8a5941abe2
5 changed files with 9 additions and 4 deletions
+3
View File
@@ -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
+1 -1
View File
@@ -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
+2 -1
View File
@@ -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:
+2 -1
View File
@@ -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
+1 -1
View File
@@ -11,4 +11,4 @@ inline const char* str(const T& v) {
}
#include<string>
extern std::string base62uuid(int l = 6);
extern std::string base62uuid(int l = 6);