Skip to content
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

Docker #250

Closed
oktaborg opened this issue May 4, 2023 · 6 comments
Closed

Docker #250

oktaborg opened this issue May 4, 2023 · 6 comments

Comments

@oktaborg
Copy link

oktaborg commented May 4, 2023

Can I run this as a docker.

@spacepirate0001
Copy link

You will need to build your own dockerfile. Recommend using node image with version 18 or higher and make sure to expose port 3000 to be able to access gui in browser.

@oktaborg
Copy link
Author

Is there any plan to release it as a docker?

@spacepirate0001
Copy link

Add Docker support #296

@wmgillett
Copy link

I was able to get it to run in a docker container on fly.io. It took only a few minutes. The flyctl generated a dockerfile automatically.

@krazyjakee
Copy link

# Install dependencies only when needed
FROM node:18-alpine AS builder
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY . .
RUN yarn install --frozen-lockfile

# If using npm with a `package-lock.json` comment out above and use below instead
# RUN npm ci

ENV NEXT_TELEMETRY_DISABLED 1

# Add `ARG` instructions below if you need `NEXT_PUBLIC_` variables
# then put the value on your fly.toml
# Example:
# ARG NEXT_PUBLIC_EXAMPLE="value here"

RUN yarn build

# If using npm comment out above and use below instead
# RUN npm run build

# Production image, copy all the files and run next
FROM node:18-alpine AS runner
WORKDIR /app

ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

COPY --from=builder /app ./

USER nextjs

CMD ["yarn", "start"]

# If using npm comment out above and use below instead
# CMD ["npm", "run", "start"]

@dosubot
Copy link

dosubot bot commented Oct 5, 2023

Hi, @oktaborg! I'm Dosu, and I'm helping the gpt4-pdf-chatbot-langchain team manage their backlog. I wanted to let you know that we are marking this issue as stale.

From what I understand, you were asking if the project can be run as a Docker container. There have been some helpful suggestions in the comments. spacepirate0001 suggested building a Dockerfile using a node image with version 18 or higher and exposing port 3000. wmgillett mentioned successfully running it in a Docker container on fly.io using the flyctl, which generated a Dockerfile automatically. krazyjakee also provided a Dockerfile example.

Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the gpt4-pdf-chatbot-langchain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.

Thank you for your contribution, and please don't hesitate to reach out if you have any further questions or concerns!

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Oct 5, 2023
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2023
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants