Optimize Docker
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user