Stability-AI / StableStudio

Community interface for generative AI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is going to be Docker support?

pabl-o-ce opened this issue · comments

Hi guys,

Amazing work

I'm just trying to create the Dockerfile for this repo

# Use the official Node.js Alpine image as the base
FROM node:alpine

# Add git
RUN apk add git

# Set the working directory in the container
WORKDIR /app

# Copy package.json and yarn.lock to the container
COPY package.json yarn.lock ./

COPY . .

# Install dependencies
RUN yarn install

# Build the project
RUN yarn build

# Expose the desired port (e.g., 3000)
EXPOSE 3000

# Start the server
CMD ["yarn", "dev"]

this is just for basic testing but... I'm getting errors

#0 73.08 ➤ YN0000: └ Completed in 1m 13s
#0 73.11 ➤ YN0000: ┌ Link step
#0 76.04 ➤ YN0007: │ yarn@npm:1.22.19 must be built because it never has been before or the last one failed
#0 76.04 ➤ YN0007: │ protobufjs@npm:6.11.3 must be built because it never has been before or the last one failed
#0 76.04 ➤ YN0007: │ esbuild@npm:0.17.18 must be built because it never has been before or the last one failed
#0 76.16 ➤ YN0007: │ root-workspace-0b6124@workspace:. must be built because it never has been before or the last one failed
#0 90.24 ➤ YN0009: │ root-workspace-0b6124@workspace:. couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-04580daf/build.log)
#0 90.24 ➤ YN0000: └ Completed in 17s 127ms
#0 90.33 ➤ YN0000: Failed with errors in 1m 30s
------
failed to solve: process "/bin/sh -c yarn install" did not complete successfully: exit code: 1

Any one can help me to make the Dockerfile to make it work on this amazing repo :)

I make it work :)

But without the yarn install

Just copy from the local yarn install I made it first

I make it work :)

But without the yarn install

Just copy from the local yarn install I made it first

Would appreciate a step by step guide a n00b docker user.

Hi @oktaborg

I make it work but now I have fail trying to proxy with nginx, Vite is kind of strange and new to me try to setup for be able been proxy

nevertheless what I have now only with open port [without nginx proxy] is this Dockefile:

# Use the official Node.js Alpine image as the base
FROM node:alpine

RUN apk add git

# Set the working directory in the container
WORKDIR /app

# Copy package.json and yarn.lock to the container
COPY package.json yarn.lock ./

COPY . .

# Install dependencies
RUN yarn

# Build the project
# RUN yarn build

# Expose the desired port (e.g., 3000)
EXPOSE 3000

# Start the server
CMD ["yarn", "dev", "--host", "0.0.0.0"]

I need to keep polish this Dockerfile (just need to know better Vite to be able to proxy)

Also open suggestion and collaboration to that is why I open the issue

To contribute to this the version of node seems to matter. I tried the above but got the original error message. After snooping around (ENV YARN_ENABLE_INLINE_BUILDS=true gave some more info during build) it was some incompatibility with the latest node docker image. I opted for an lts version:

This is my docker file (I use compose for exposing the ports)

FROM node:lts-alpine3.18

RUN apk add git
RUN apk add --no-cache build-base python3

# Set the working directory in the container
WORKDIR /app

# copy everything except stuff in .dockerignore
COPY . .

# Install dependencies
#ENV YARN_ENABLE_INLINE_BUILDS=true
RUN yarn

# Build the project
# RUN yarn build

# Start the server
CMD ["yarn", "dev", "--host", "0.0.0.0"]