Closed Suleman-Elahi closed 10 months ago
Hi @Suleman-Elahi Thanks for reporting! Follow the instructions in the README for now
For what it's worth, I changed my Dockerfile to this for now and got it working. I immediately ran into #46 though, but this performs the build on the docker container:
FROM python:3.11
RUN apt-get install -y libmagic1
WORKDIR /backend
COPY ./backend .
RUN rm poetry.lock
RUN pip install .
# We are going to install yarn and do the build inside the docker container:
# Install yarn:
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" >> /etc/apt/sources.list.d/yarn.list && \
apt update && \
apt install -y yarn
# Copy the frontend folder into the container:
COPY ./frontend ./frontend
# Install the frontend dependencies and build the frontend:
RUN cd ./frontend && yarn install
RUN cd ./frontend && yarn build
# Now copy the built `dist` folder that is inside of the container into ./ui:
RUN cp -r ./frontend/dist ./ui
CMD exec uvicorn app.server:app --host 0.0.0.0 --port $PORT
@Suleman-Elahi if you replace ./frontend/dist with ./frontend/src it will work. There is no dist folder inside frontend.
I tried running the docker compose setup with the config that's currently in the main branch, with the dockerfile of @Taytay and I also replaced the path as @sudarshan-koirala suggested.
All of them show success logs, but when I open the website there's always a blank page.
Logs:
✔ Network opengpts_default Created 0.1s
✔ Container redis Created 0.0s
✔ Container opengpts-backend-1 Created 0.0s
Attaching to backend-1, redis
redis | 1:C 30 Nov 2023 23:03:27.501 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis | 1:C 30 Nov 2023 23:03:27.501 # Redis version=6.2.13, bits=64, commit=00000000, modified=0, pid=1, just started
redis | 1:C 30 Nov 2023 23:03:27.501 # Configuration loaded
redis | 1:M 30 Nov 2023 23:03:27.502 * monotonic clock: POSIX clock_gettime
redis | 1:M 30 Nov 2023 23:03:27.502 * Running mode=standalone, port=6379.
redis | 1:M 30 Nov 2023 23:03:27.502 # Server initialized
redis | 1:M 30 Nov 2023 23:03:27.502 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis | 1:M 30 Nov 2023 23:03:27.504 * <search> Redis version found by RedisSearch : 6.2.13 - oss
redis | 1:M 30 Nov 2023 23:03:27.504 * <search> RediSearch version 2.6.13 (Git=HEAD-f966d37f)
redis | 1:M 30 Nov 2023 23:03:27.504 * <search> Low level api version 1 initialized successfully
redis | 1:M 30 Nov 2023 23:03:27.504 * <search> concurrent writes: OFF, gc: ON, prefix min length: 2, prefix max expansions: 200, query timeout (ms): 500, timeout policy: return, cursor read size: 1000, cursor max idle (ms): 300000, max doctable size: 1000000, max number of search results: 1000000, search pool size: 20, index pool size: 8,
redis | 1:M 30 Nov 2023 23:03:27.504 * <search> Initialized thread pool!
redis | 1:M 30 Nov 2023 23:03:27.504 * <search> Enabled diskless replication
redis | 1:M 30 Nov 2023 23:03:27.504 * <search> Enabled role change notification
redis | 1:M 30 Nov 2023 23:03:27.504 * Module 'search' loaded from /usr/lib/redis/modules/redisearch.so
redis | 1:M 30 Nov 2023 23:03:27.505 * <ReJSON> Created new data type 'ReJSON-RL'
redis | 1:M 30 Nov 2023 23:03:27.505 * <ReJSON> version: 999999 git sha: unknown branch: unknown
redis | 1:M 30 Nov 2023 23:03:27.505 * <ReJSON> Exported RedisJSON_V1 API
redis | 1:M 30 Nov 2023 23:03:27.505 * <ReJSON> Exported RedisJSON_V2 API
redis | 1:M 30 Nov 2023 23:03:27.505 * <ReJSON> Exported RedisJSON_V3 API
redis | 1:M 30 Nov 2023 23:03:27.505 * <ReJSON> Exported RedisJSON_V4 API
redis | 1:M 30 Nov 2023 23:03:27.505 * <ReJSON> Enabled diskless replication
redis | 1:M 30 Nov 2023 23:03:27.505 * Module 'ReJSON' loaded from /usr/lib/redis/modules/rejson.so
redis | 1:M 30 Nov 2023 23:03:27.505 * <search> Acquired RedisJSON_V3 API
redis | 1:M 30 Nov 2023 23:03:27.505 * Ready to accept connections
backend-1 | INFO: Started server process [1]
backend-1 | INFO: Waiting for application startup.
backend-1 | INFO: Application startup complete.
backend-1 | INFO: Uvicorn running on http://0.0.0.0:8100 (Press CTRL+C to quit)
Webpage:
@dentro-innovation Are you working locally? If yes, you can try http://localhost:8100/ instead of http://0.0.0.0:8100/. Locally, it works for me, but I see the white web page on the VPS server. Perhaps, there are some dependences, which I did not have on the server?
@dentro-innovation I created a video on how to use docker for opengpts, link here -> https://youtu.be/8wZreQL0V44?si=WIkV9MtjfzwGUVu7
@sudarshan-koirala Thank you for nice video! Unfortunately, I have a problem similar to @dentro-innovation, but on VPS. In the browser, I see just white web page. Logs do not show errors, but I do not see in them good comments as for example ""GET /runs/config_schema HTTP/1.1" 200 OK", which I see locally. Locally my docker is working.
Same here. Blank page when not working locally : http://_myhost_:8100/ Has anyone managed to make this service available on a server (excluding localhost access)?
Same here. Blank page when not working locally : http://_myhost_:8100/ Has anyone managed to make this service available on a server (excluding localhost access)?
You can try tunnelling the localhost using Cloudflare or ngrok or something like that to expose to internet.