Giter Site home page Giter Site logo

Comments (10)

erbanku avatar erbanku commented on July 23, 2024

请问Nginx端口改成多少了的呢?我修改一下,然后Build试试。
如果没有特殊需求,也可以用我 Build 的 Docker Image 试试。

Package speechgpt

docker pull ghcr.io/erbanku/speechgpt:0.4.0
Solution generated by GPT-4

It seems that the docker build process is stuck at the "yarn build" step, which is taking a long time to complete. This could be due to various reasons, such as insufficient resources on your machine, network issues, or the build process itself taking a long time.

To troubleshoot the issue, you can try the following steps:

  1. Check if there are any resource constraints on your machine, such as high CPU or memory usage. If so, try closing unnecessary applications or increasing the resources allocated to Docker.
  2. Check your network connection and make sure it is stable. Network issues might cause the build process to take longer than expected.
  3. Inspect the build process itself. You can try running the build command (yarn build) outside of Docker to see if it takes a similarly long time to complete. If it does, you might need to optimize the build process or investigate any issues with the build configuration.
  4. Check for any error messages in the build output. If there are any errors, they might provide clues as to why the build is not completing successfully.
  5. If the build is still not completing, you can try running the docker build command with the --no-cache option to force a clean build. This might help resolve any issues with cached layers:
docker build --no-cache . -t speechgpt --network host

If none of these steps resolve the issue, you might need to investigate further by looking into the specific build process and configuration for your project.

from speechgpt.

matthuo333 avatar matthuo333 commented on July 23, 2024

改成了 48080

from speechgpt.

erbanku avatar erbanku commented on July 23, 2024

改成了 48080

我这边没有遇到问题,修改 Nginx 端口后也 Build 成功了,可能是系统环境配置的问题。

修改后 Build 的 Image,可以拿去用:Package speechgpt-a

docker pull ghcr.io/erbanku/speechgpt-a:latest

Nginx 端口修改 - 48080

image

Build 成功

image

from speechgpt.

matthuo333 avatar matthuo333 commented on July 23, 2024

多谢了! 先暂时用官方提供image, 不过运行后出现 “Error with builtin speech recognition”, 然后放行浏览器对于mirophone的block , 刷新后又限制。

from speechgpt.

matthuo333 avatar matthuo333 commented on July 23, 2024

如果访问的端口不是ssl 或tls 是不能允许开启mirophone

from speechgpt.

matthuo333 avatar matthuo333 commented on July 23, 2024

看来又必须重新build了

from speechgpt.

matthuo333 avatar matthuo333 commented on July 23, 2024

我重新安装docker后,貌似还不是不行。你的Dockerfile 能分享下?

from speechgpt.

erbanku avatar erbanku commented on July 23, 2024

我重新安装docker后,貌似还不是不行。你的Dockerfile 能分享下?

Dockerfile

FROM node:alpine as builder

ARG VITE_OPENAI_API_KEY=REPLACE_WITH_YOUR_OWN
ARG VITE_OPENAI_HOST=REPLACE_WITH_YOUR_OWN
ARG VITE_AWS_REGION=REPLACE_WITH_YOUR_OWN
ARG VITE_AWS_ACCESS_KEY_ID=REPLACE_WITH_YOUR_OWN
ARG VITE_AWS_ACCESS_KEY=REPLACE_WITH_YOUR_OWN
ARG VITE_AZURE_REGION=REPLACE_WITH_YOUR_OWN
ARG VITE_AZURE_KEY=REPLACE_WITH_YOUR_OWN

ENV VITE_OPENAI_API_KEY=$VITE_OPENAI_API_KEY \
    VITE_OPENAI_HOST=$VITE_OPENAI_HOST \
    VITE_AWS_REGION=$VITE_AWS_REGION \
    VITE_AWS_ACCESS_KEY_ID=$VITE_AWS_ACCESS_KEY_ID \
    VITE_AWS_ACCESS_KEY=$VITE_AWS_ACCESS_KEY \
    VITE_AZURE_REGION=$VITE_AZURE_REGION \
    VITE_AZURE_KEY=$VITE_AZURE_KEY

WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install
COPY . .
RUN yarn build

FROM nginx:alpine
COPY nginx.conf /etc/nginx/nginx.conf
WORKDIR /usr/share/nginx/html
COPY --from=builder /app/dist .
ENTRYPOINT ["nginx", "-g", "daemon off;"]

from speechgpt.

erbanku avatar erbanku commented on July 23, 2024

建议用干净的 linux 系统(VPS之类的)来 Build,这样你会很少遇到奇怪的问题。

from speechgpt.

matthuo333 avatar matthuo333 commented on July 23, 2024

换了个Centos 系统,没问题了。 但是,在需要对容器加入ssl时候遇到问题。
下面是修改后的nginx配置,同时也在Dockerfile中加入了导入证书的COPY

但最后需要先运行 xxx.com:[80mapping port], 然后再运行 xxx.com:[443mapping port], 这样才OK,请大神看看什么原因呢?

worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
server {
listen 443 ssl;
server_name xxx.com;

    ssl_certificate /etc/ssl/certs/xxx.cer;
    ssl_certificate_key /etc/ssl/private/xxxx.key;

    location / {
        root /usr/share/nginx/html;
        index index.html index.htm;
        try_files $uri $uri/ /index.html;
    }
}

server {
    listen 80;
    server_name xxx.com;
    return 301 https://$host$request_uri;
}

}

from speechgpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.