@@ -10,58 +10,56 @@ For more information on how to use Cortex, please refer to the [Cortex Documenta
1010
1111### Instructions
1212
13- #### Build Cortex Docker Image from source or Pull from Docker Hub
13+ ** Build Cortex Docker Image from source or Pull from Docker Hub**
1414
15- ##### Pull Cortex Docker Image from Docker Hub
15+ - Pull Cortex Docker Image from Docker Hub
1616
17- ```bash
18- # Pull the latest image
19- docker pull menloltd/cortex:latest
17+ ``` bash
18+ # Pull the latest image
19+ docker pull menloltd/cortex:latest
2020
21- # Pull a specific version
22- docker pull menloltd/cortex:nightly-1.0.1-224
23- ```
21+ # Pull a specific version
22+ docker pull menloltd/cortex:nightly-1.0.1-224
23+ ```
2424
25- ##### Build and Run Cortex Docker Container from Dockerfile
25+ - Build and Run Cortex Docker Container from Dockerfile
2626
27- 1 . Clone the Cortex repository
28- ``` bash
29- git clone https://github.com/janhq/cortex.cpp.git
30- cd cortex.cpp
31- git submodule update --init
32- ```
33- 2. Build the Docker image
34- ` ` ` bash
35- # Default always uses the latest cortex.cpp and cortex.llamacpp
36- docker build -t cortex --build-arg CORTEX_CPP_VERSION=$( git rev-parse HEAD) -f docker/Dockerfile .
27+ ``` bash
28+ git clone https://github.com/janhq/cortex.cpp.git
29+ cd cortex.cpp
30+ git submodule update --init
3731
38- # Use specific version of cortex.cpp and cortex.llamacpp
39- docker build --build-arg CORTEX_LLAMACPP_VERSION=0.1.34 --build-arg CORTEX_CPP_VERSION=$( git rev-parse HEAD) -t cortex -f docker/Dockerfile .
40- ` ` `
32+ # Default always uses the latest cortex.cpp and cortex.llamacpp
33+ docker build -t menloltd/cortex --build-arg CORTEX_CPP_VERSION=$( git rev-parse HEAD) -f docker/Dockerfile .
4134
42- # ### Run Cortex Docker Container
35+ # Use specific version of cortex.cpp and cortex.llamacpp
36+ docker build --build-arg CORTEX_LLAMACPP_VERSION=0.1.34 --build-arg CORTEX_CPP_VERSION=$( git rev-parse HEAD) -t menloltd/cortex -f docker/Dockerfile .
37+ ```
4338
44- 1. Run the Docker container
45- ` ` ` bash
46- # Create Volume to store models and data
47- docker volume create cortex_data
39+ ** Run Cortex Docker Container**
4840
49- # CPU mode
50- docker run -it -d --name cortex -v cortex_data:/root/cortexcpp -p 39281:39281 cortex
41+ ``` bash
42+ # Create Volume to store models and data
43+ docker volume create cortex_data
5144
52- # GPU mode - nvidia-docker required, it will automatically use all available GPUs
53- docker run --gpus all -it -d --name cortex -v cortex_data:/root/cortexcpp -p 39281:39281 cortex
54- ` ` `
45+ # GPU mode - nvidia-docker required, it will automatically use all available GPUs
46+ docker run --gpus all -it -d --name cortex -v cortex_data:/root/cortexcpp -p 39281:39281 menloltd/cortex
5547
56- 2. Check logs (Optional)
57- ` ` ` bash
58- docker logs cortex
59- ` ` `
48+ # CPU mode
49+ docker run -it -d --name cortex -v cortex_data:/root/cortexcpp -p 39281:39281 menloltd/cortex
50+ ```
6051
61- 3. Access to http://localhost:39281 to check the cortex docs API.
52+ ** Check logs (Optional) **
6253
63- 4. Execute to container and try out cortex cli
64- ` ` ` bash
65- docker exec -it cortex bash
66- cortex --help
67- ` ` `
54+ ``` bash
55+ docker logs cortex
56+ ```
57+
58+ ** Access to http://localhost:39281 to check the cortex docs API.**
59+
60+ ** Execute to container and try out cortex cli**
61+
62+ ``` bash
63+ docker exec -it cortex bash
64+ cortex --help
65+ ```
0 commit comments