mirror of
https://github.com/cocktailpeanut/dalai
synced 2025-02-14 20:14:29 +01:00
Merge pull request #229 from metrafonic/main
Added docker files (including docker compose)
This commit is contained in:
commit
e4f678efa2
34
Dockerfile
Normal file
34
Dockerfile
Normal file
@ -0,0 +1,34 @@
|
||||
FROM python:3.10-slim-buster
|
||||
|
||||
# The dalai server runs on port 3000
|
||||
EXPOSE 3000
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
build-essential \
|
||||
curl \
|
||||
g++ \
|
||||
git \
|
||||
make \
|
||||
python3-venv \
|
||||
software-properties-common
|
||||
|
||||
# Add NodeSource PPA to get Node.js 18.x
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
|
||||
|
||||
# Install Node.js 18.x
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y nodejs
|
||||
|
||||
WORKDIR /root/dalai
|
||||
|
||||
# Install dalai and its dependencies
|
||||
RUN npm install dalai@0.3.1
|
||||
|
||||
RUN npx dalai alpaca setup
|
||||
|
||||
|
||||
# Run the dalai server
|
||||
CMD [ "npx", "dalai", "serve" ]
|
||||
|
9
docker-compose.yml
Normal file
9
docker-compose.yml
Normal file
@ -0,0 +1,9 @@
|
||||
version: '3.7'
|
||||
services:
|
||||
dalai:
|
||||
build: .
|
||||
ports:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
- ./models/alpaca:/root/dalai/alpaca
|
||||
- ./models/llama:/root/dalai/llama
|
@ -111,6 +111,19 @@ You do NOT have to install all models, you can install one by one. Let's take a
|
||||
|
||||
# Quickstart
|
||||
|
||||
## Docker compose
|
||||
|
||||
Requires that you have docker installed and running.
|
||||
```
|
||||
docker compose build
|
||||
docker compose run dalai npx dalai alpaca install 7B # or a different model
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
This will dave the models in the `./models` folder
|
||||
|
||||
View the site at http://127.0.0.1:3000/
|
||||
|
||||
## Mac
|
||||
|
||||
### Step 1. Install node.js >= 18
|
||||
|
Loading…
Reference in New Issue
Block a user