Skip to content

implementation of replicate within scaffold #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
21 changes: 7 additions & 14 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
# Start from the official Go image to create a build artifact.
FROM golang:1.22 AS builder
# backend/Dockerfile
FROM golang:1.22-alpine

# Copy local code to the container image.
WORKDIR /app
COPY . .
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN go build -o main .

# Build the command inside the container.
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -v -o server

# Use a Docker multi-stage build to create a lean production image.
FROM gcr.io/distroless/base-debian10

COPY --from=builder /app/server /server

# Run the web service on container startup.
CMD ["/server"]
CMD ["./main"]
35 changes: 19 additions & 16 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
version: '3.8'
services:
frontend:
build: ./frontend/frontend-scaffold
build:
context: ./frontend/frontend-scaffold
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- ./frontend/frontend-scaffold:/app
command: npm run dev

- "80:80"
backend:
build: ./backend
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8080:8080"
volumes:
- ./backend:/go/src/app
command: /server

llm-service:
build: ./llm-service
depends_on:
- mongo
mongo:
image: mongo:latest
ports:
- "27017:27017"
environment:
- PROMPT=Your default prompt or leave this to be configured elsewhere
# Optional: Expose port if the LLM service provides an HTTP API or similar
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
llama:
image: r8.im/meta/llama-2-70b-chat@sha256:02e509c789964a7ea8736978a43525956ef40397be9033abf9fd2badfe68c9e3
ports:
- "5001:5000"
- "5001:5000"
# runtime: nvidia
25 changes: 9 additions & 16 deletions frontend/frontend-scaffold/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
# Use an official Node runtime as a parent image
FROM node:latest
# frontend/Dockerfile
FROM node:16-alpine as build-stage

# Set the working directory in the container
WORKDIR /usr/src/app

# Copy the current directory contents into the container at /usr/src/app
COPY . .

# Install any needed packages specified in package.json
WORKDIR /app
COPY package*.json ./
RUN npm install

# Build the SvelteKit app
COPY . ./
RUN npm run build

# Make port 3000 available to the world outside this container
EXPOSE 3000

# Run npm run preview when the container launches
CMD ["npm", "run", "preview"]
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/.svelte-kit/output/client /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Binary file removed llm-service/.DS_Store
Binary file not shown.
43 changes: 0 additions & 43 deletions llm-service/Dockerfile

This file was deleted.

1 change: 0 additions & 1 deletion llm-service/llama
Submodule llama deleted from ef351e