Optimize Docker

dev
Bill 2 years ago
parent 09aa73c346
commit 8a5941abe2

@ -18,6 +18,9 @@ RUN python3 -m pip install -r AQuery2/requirements.txt
ENV IS_DOCKER_IMAGE=1 CXX=clang++-14 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 CMD cd AQuery2 && python3 prompt.py

@ -3,7 +3,7 @@ MonetDB_LIB =
MonetDB_INC = MonetDB_INC =
Threading = Threading =
CXXFLAGS = --std=c++1z CXXFLAGS = --std=c++1z
OPTFLAGS = -O3 -DNDEBUG OPTFLAGS = -O3 -DNDEBUG
LINKFLAGS = -flto # + $(AQ_LINK_FLAG) LINKFLAGS = -flto # + $(AQ_LINK_FLAG)
SHAREDFLAGS = -shared SHAREDFLAGS = -shared
FPIC = -fPIC FPIC = -fPIC

@ -71,7 +71,8 @@ There're multiple options to run AQuery on Windows. You can use the native toolc
### Docker: ### Docker:
- Alternatively, you can also use docker to run AQuery. - Alternatively, you can also use docker to run AQuery.
- Type `make docker` to build the docker image from scratch. - 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 ## Usage
`python3 prompt.py` will launch the interactive command prompt. The server binary will be automatically rebuilt and started. `python3 prompt.py` will launch the interactive command prompt. The server binary will be automatically rebuilt and started.
#### Commands: #### Commands:

@ -337,7 +337,8 @@ def prompt(running = lambda:True, next = lambda:input('> '), state = None):
try: try:
og_q : str = next() og_q : str = next()
except EOFError: except EOFError:
continue print('stdin inreadable, Exiting...')
exit(0)
q = og_q.lower().strip() q = og_q.lower().strip()
if False and q == 'exec': # generate build and run (AQuery Engine) if False and q == 'exec': # generate build and run (AQuery Engine)
state.cfg.backend_type = Backend_Type.BACKEND_AQuery.value state.cfg.backend_type = Backend_Type.BACKEND_AQuery.value

@ -11,4 +11,4 @@ inline const char* str(const T& v) {
} }
#include<string> #include<string>
extern std::string base62uuid(int l = 6); extern std::string base62uuid(int l = 6);

Loading…
Cancel
Save