-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (19 loc) · 758 Bytes
/
Dockerfile
File metadata and controls
27 lines (19 loc) · 758 Bytes
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
# Use the official Node.js image as a parent image
FROM node:18
# Set the working directory within the docker image
WORKDIR /usr/src/app
# Copy the current directory contents into the container at /usr/src/app
COPY . .
# Install any needed packages for C++ build
RUN apt-get update && apt-get install -y \
build-essential
# Build the C++ application
# UNAME_M=arm64 UNAME_p=arm LLAMA_NO_METAL=1 make is used to build for Mac ARM64 architecture
RUN cd llama.cpp && make clean && UNAME_M=arm64 UNAME_p=arm LLAMA_NO_METAL=1 make
RUN chmod +x llama.cpp/main
# Install Node.js dependencies
RUN npm install
# Make port 80 available to the world outside this container
EXPOSE 80
# Run server.js when the container launches
CMD ["node", "server.js"]