File size: 1,167 Bytes
a5e87d0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Use an official Ubuntu as a parent image
FROM ubuntu:latest

# Set the working directory to /app
WORKDIR /app

# Update the package list and install necessary packages
RUN apt-get update && \
    apt-get install -y git wget curl build-essential && \
    rm -rf /var/lib/apt/lists/*

# clone one git repo
RUN git clone "https://github.com/antimatter15/alpaca.cpp.git"

# cd into alpaca.cpp folder and run make command
RUN cd alpaca.cpp && make && cd ..

RUN wget "https://huggingface.co/sosaka/alpaca-native-4bit-ggml/resolve/main/ggml-alpaca-7b-q4.bin"

# copy the chat file to /app
RUN cp alpaca.cpp/chat .

# remove the alpaca.cpp folder
RUN rm -rf alpaca.cpp

# Copy the package.json and package-lock.json files to the container
COPY package*.json ./

# Install the dependencies and Node.js
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install -y nodejs
RUN npm install -g npm@9.5.0 && npm install && rm -rf /var/lib/apt/lists/*

# Copy the rest of the application files to the container
COPY . .

# Build the Vite app
RUN npm run build

# Expose port 8889 for the Express app
EXPOSE 8889

# Start the Express app
CMD ["npm", "start"]