Closed yxmnjxzx closed 1 year ago
same
@yxmnjxzx query_methods locate in ./gui
directory. try to run streamlit run gui/streamlit_chat_app.py
@yxmnjxzx query_methods locate in
./gui
directory. try to runstreamlit run gui/streamlit_chat_app.py
here is the error message from your command:
Traceback (most recent call last):
File "/home/vwpfong/.local/lib/python3.7/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "streamlit_chat_app.py", line 8, in
@yxmnjxzx query_methods locate in
./gui
directory. try to runstreamlit run gui/streamlit_chat_app.py
here is the error message from your command:Traceback (most recent call last): File "/home/vwpfong/.local/lib/python3.7/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script exec(code, module.dict) File "streamlit_chat_app.py", line 8, in from streamlit_chat import message ModuleNotFoundError: No module named 'streamlit_chat' 2023-04-30 03:06:13.280 Uncaught app exception Traceback (most recent call last): File "/home/vwpfong/.local/lib/python3.7/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script exec(code, module.dict) File "streamlit_chat_app.py", line 8, in from streamlit_chat import message ModuleNotFoundError: No module named 'streamlit_chat' 2023-04-30 03:06:14.440 Uncaught app exception Traceback (most recent call last): File "/home/vwpfong/.local/lib/python3.7/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script exec(code, module.dict) File "streamlit_chat_app.py", line 8, in from streamlit_chat import message ModuleNotFoundError: No module named 'streamlit_chat'
Did you install all requirements from requirements.txt? Seems no
Did you install all requirements from requirements.txt? Seems no
you were right. I ran the command outside of docker the first time so missed out the installment of requirements.txt. After I ran the requirements.txt, I still got this following error message (I can also confirm that if I build from dockerfile and run inside docker I get the same 'no module named query_methods' error message. What I dont understand is that running inside docker and outside docker should produce the same error message) but they dont give the same error messages:
2023-04-30 04:20:17.842 Uncaught app exception
Traceback (most recent call last):
File "/home/vwpfong/.local/lib/python3.7/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "/home/vwpfong/gptlatest/gpt4free/gui/streamlit_chat_app.py", line 8, in
Did you install all requirements from requirements.txt? Seems no
you were right. I ran the command outside of docker the first time so missed out the installment of requirements.txt. After I ran the requirements.txt, I still got this following error message (I can also confirm that if I build from dockerfile and run inside docker I get the same 'no module named query_methods' error message. What I dont understand is that running inside docker and outside docker should produce the same error message) but they dont give the same error messages:
2023-04-30 04:20:17.842 Uncaught app exception Traceback (most recent call last): File "/home/vwpfong/.local/lib/python3.7/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script exec(code, module.dict) File "/home/vwpfong/gptlatest/gpt4free/gui/streamlit_chat_app.py", line 8, in from streamlit_chat import message ModuleNotFoundError: No module named 'streamlit_chat'
streamlit_chat
is the one of module from streamlit
package. check the streamlit
Did you install all requirements from requirements.txt? Seems no
I spinned up a fresh copy of linux vm and installed python3.11 from scratch. I got it working but only 'theb' api worked.
I can also confirm that running the docker version i.e. using 'streamlit_chat_app.py' instead of 'streamlit_app.py' in the dockerfile will produce the error message mentioned previously.
Dockerfile has been modified as follows:
FROM python:3.10
RUN apt-get update && apt-get install -y git
RUN mkdir -p /usr/src/gpt4free WORKDIR /usr/src/gpt4free
COPY requirements.txt /usr/src/gpt4free/ RUN pip install --no-cache-dir -r requirements.txt COPY . /usr/src/gpt4free
RUN cp gui/streamlit_chat_app.py .
EXPOSE 8501
CMD ["streamlit", "run", "streamlit_chat_app.py"]
Did you resolve this in Docker
?
I also added
RUN cp gui/query_methods.py .
But run the prompt, it happnes
I solved the problem by not copying the streamlit_chat_app.py to the base folder.
streamlit run gui/streamlit_chat_app.py
not streamlit run streamlit_chat.py
@lisanhu Thank you for replying
FROM python:3.10
RUN apt-get update && apt-get install -y git
RUN mkdir -p /usr/src/gpt4free
WORKDIR /usr/src/gpt4free
COPY requirements.txt /usr/src/gpt4free/
RUN pip install --no-cache-dir -r requirements.txt
COPY . /usr/src/gpt4free
#the following line has been changed
RUN cp gui/query_methods.py .
RUN cp gui/streamlit_app.py .
# I removed copying
# RUN cp gui/streamlit_chat_app.py .
EXPOSE 8501
#the following line has been changed
# I renamed folder path with gui/
CMD ["streamlit", "run", "gui/streamlit_chat_app.py"]
But same error happned.
Weird, mine worked fine
Dockerfile:
FROM python:3.11 as builder
WORKDIR /usr/app
ENV PATH="/usr/app/venv/bin:$PATH"
#RUN apt-get update && apt-get install -y git
RUN mkdir -p /usr/app
RUN python -m venv ./venv
COPY requirements.txt .
RUN pip install -r requirements.txt
# RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
# RUN pip config set global.trusted-host mirrors.aliyun.com
FROM python:3.11
WORKDIR /usr/app
ENV PATH="/usr/app/venv/bin:$PATH"
COPY --from=builder /usr/app/venv ./venv
COPY . .
# RUN cp ./gui/streamlit_app.py .
CMD ["streamlit", "run", "gui/streamlit_app.py"]
EXPOSE 8501
Output
~/mine/tmp/gpt4free $ docker build .
Sending build context to Docker daemon 589.3MB
Step 1/14 : FROM python:3.11 as builder
3.11: Pulling from library/python
918547b94326: Pull complete
5d79063a01c5: Pull complete
4eedd9c5abf7: Pull complete
9cdadd40055f: Pull complete
2a12d0031f3f: Pull complete
24685c45a066: Pull complete
6ba57ec00f34: Pull complete
71bcc9787aa7: Pull complete
Digest: sha256:30f9c5b85d6a9866dd6307d24f4688174f7237bc3293b9293d590b1e59c68fc7
Status: Downloaded newer image for python:3.11
---> 815c8c75dfc0
Step 2/14 : WORKDIR /usr/app
---> Running in a03ce720366c
Removing intermediate container a03ce720366c
---> 187f412531cf
Step 3/14 : ENV PATH="/usr/app/venv/bin:$PATH"
---> Running in 1879ce1b3c19
Removing intermediate container 1879ce1b3c19
---> 4537399be190
Step 4/14 : RUN mkdir -p /usr/app
---> Running in 6120f516dbf6
Removing intermediate container 6120f516dbf6
---> 890000c3b352
Step 5/14 : RUN python -m venv ./venv
---> Running in 5983da805966
Removing intermediate container 5983da805966
---> f662dc18cd69
Step 6/14 : COPY requirements.txt .
---> 30197084d843
Step 7/14 : RUN pip install -r requirements.txt
---> Running in 3e123eca3218
Collecting https://github.com/AI-Yash/st-chat/archive/refs/pull/24/head.zip (from -r requirements.txt (line 12))
Downloading https://github.com/AI-Yash/st-chat/archive/refs/pull/24/head.zip (5.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.5/5.5 MB 11.5 MB/s eta 0:00:00
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting websocket-client
Downloading websocket_client-1.5.1-py3-none-any.whl (55 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.9/55.9 kB 1.7 MB/s eta 0:00:00
Collecting requests
Downloading requests-2.30.0-py3-none-any.whl (62 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.5/62.5 kB 6.8 MB/s eta 0:00:00
Collecting tls-client
Downloading tls_client-0.2.1-py3-none-any.whl (35.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 35.2/35.2 MB 6.8 MB/s eta 0:00:00
Collecting pypasser
Downloading PyPasser-0.0.5.tar.gz (10 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting names
Downloading names-0.3.0.tar.gz (789 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 789.1/789.1 kB 3.1 MB/s eta 0:00:00
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting colorama
Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting curl_cffi
Downloading curl_cffi-0.5.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.2/7.2 MB 2.3 MB/s eta 0:00:00
Collecting streamlit==1.21.0
Downloading streamlit-1.21.0-py2.py3-none-any.whl (9.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.7/9.7 MB 2.6 MB/s eta 0:00:00
Collecting selenium
Downloading selenium-4.9.0-py3-none-any.whl (6.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.5/6.5 MB 2.2 MB/s eta 0:00:00
Collecting fake-useragent
Downloading fake_useragent-1.1.3-py3-none-any.whl (50 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50.5/50.5 kB 1.1 MB/s eta 0:00:00
Collecting twocaptcha
Downloading TwoCaptcha-0.0.1.tar.gz (2.9 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting pydantic
Downloading pydantic-1.10.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 1.9 MB/s eta 0:00:00
Collecting pymailtm
Downloading pymailtm-1.1.1-py3-none-any.whl (19 kB)
Collecting Levenshtein
Downloading Levenshtein-0.21.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (173 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 174.0/174.0 kB 2.8 MB/s eta 0:00:00
Collecting altair<5,>=3.2.0
Downloading altair-4.2.2-py3-none-any.whl (813 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 813.6/813.6 kB 2.2 MB/s eta 0:00:00
Collecting blinker>=1.0.0
Downloading blinker-1.6.2-py3-none-any.whl (13 kB)
Collecting cachetools>=4.0
Downloading cachetools-5.3.0-py3-none-any.whl (9.3 kB)
Collecting click>=7.0
Downloading click-8.1.3-py3-none-any.whl (96 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 kB 1.8 MB/s eta 0:00:00
Collecting importlib-metadata>=1.4
Downloading importlib_metadata-6.6.0-py3-none-any.whl (22 kB)
Collecting numpy
Downloading numpy-1.24.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 2.6 MB/s eta 0:00:00
Collecting packaging>=14.1
Downloading packaging-23.1-py3-none-any.whl (48 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.9/48.9 kB 1.7 MB/s eta 0:00:00
Collecting pandas<2,>=0.25
Downloading pandas-1.5.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.0/12.0 MB 6.9 MB/s eta 0:00:00
Collecting pillow>=6.2.0
Downloading Pillow-9.5.0-cp311-cp311-manylinux_2_28_x86_64.whl (3.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 15.2 MB/s eta 0:00:00
Collecting protobuf<4,>=3.12
Downloading protobuf-3.20.3-py2.py3-none-any.whl (162 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 162.1/162.1 kB 10.8 MB/s eta 0:00:00
Collecting pyarrow>=4.0
Downloading pyarrow-12.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (38.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.9/38.9 MB 3.3 MB/s eta 0:00:00
Collecting pympler>=0.9
Downloading Pympler-1.0.1-py3-none-any.whl (164 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 164.8/164.8 kB 2.6 MB/s eta 0:00:00
Collecting python-dateutil
Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 3.0 MB/s eta 0:00:00
Collecting rich>=10.11.0
Downloading rich-13.3.5-py3-none-any.whl (238 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 238.7/238.7 kB 2.7 MB/s eta 0:00:00
Collecting toml
Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting typing-extensions>=3.10.0.0
Downloading typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Collecting tzlocal>=1.1
Downloading tzlocal-4.3-py3-none-any.whl (20 kB)
Collecting validators>=0.2
Downloading validators-0.20.0.tar.gz (30 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting gitpython!=3.1.19
Downloading GitPython-3.1.31-py3-none-any.whl (184 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 184.3/184.3 kB 1.2 MB/s eta 0:00:00
Collecting pydeck>=0.1.dev5
Downloading pydeck-0.8.1b0-py2.py3-none-any.whl (4.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.8/4.8 MB 2.1 MB/s eta 0:00:00
Collecting tornado>=6.0.3
Downloading tornado-6.3.1-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (426 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 426.8/426.8 kB 2.9 MB/s eta 0:00:00
Collecting watchdog
Downloading watchdog-3.0.0-py3-none-manylinux2014_x86_64.whl (82 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 82.1/82.1 kB 541.8 kB/s eta 0:00:00
Collecting charset-normalizer<4,>=2
Downloading charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (197 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 197.3/197.3 kB 1.1 MB/s eta 0:00:00
Collecting idna<4,>=2.5
Downloading idna-3.4-py3-none-any.whl (61 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 2.6 MB/s eta 0:00:00
Collecting urllib3<3,>=1.21.1
Downloading urllib3-2.0.2-py3-none-any.whl (123 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.2/123.2 kB 2.8 MB/s eta 0:00:00
Collecting certifi>=2017.4.17
Downloading certifi-2022.12.7-py3-none-any.whl (155 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.3/155.3 kB 2.1 MB/s eta 0:00:00
Collecting PySocks==1.7.1
Downloading PySocks-1.7.1-py3-none-any.whl (16 kB)
Collecting SpeechRecognition==3.8.1
Downloading SpeechRecognition-3.8.1-py2.py3-none-any.whl (32.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 32.8/32.8 MB 3.7 MB/s eta 0:00:00
Collecting pydub==0.25.1
Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)
Collecting cffi>=1.12.0
Downloading cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (462 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 462.6/462.6 kB 3.3 MB/s eta 0:00:00
Collecting urllib3[socks]~=1.26
Downloading urllib3-1.26.15-py2.py3-none-any.whl (140 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.9/140.9 kB 2.7 MB/s eta 0:00:00
Collecting trio~=0.17
Downloading trio-0.22.0-py3-none-any.whl (384 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 384.9/384.9 kB 2.3 MB/s eta 0:00:00
Collecting trio-websocket~=0.9
Downloading trio_websocket-0.10.2-py3-none-any.whl (17 kB)
Collecting pyperclip<2.0.0,>=1.8.2
Downloading pyperclip-1.8.2.tar.gz (20 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting random-username<2.0.0,>=1.0.2
Downloading random_username-1.0.2-py3-none-any.whl (6.7 kB)
Collecting rapidfuzz<4.0.0,>=2.3.0
Downloading rapidfuzz-3.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 1.8 MB/s eta 0:00:00
Collecting entrypoints
Downloading entrypoints-0.4-py3-none-any.whl (5.3 kB)
Collecting jinja2
Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 2.5 MB/s eta 0:00:00
Collecting jsonschema>=3.0
Downloading jsonschema-4.17.3-py3-none-any.whl (90 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.4/90.4 kB 2.6 MB/s eta 0:00:00
Collecting toolz
Downloading toolz-0.12.0-py3-none-any.whl (55 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.8/55.8 kB 3.5 MB/s eta 0:00:00
Collecting pycparser
Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 2.4 MB/s eta 0:00:00
Collecting gitdb<5,>=4.0.1
Downloading gitdb-4.0.10-py3-none-any.whl (62 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.7/62.7 kB 3.8 MB/s eta 0:00:00
Collecting zipp>=0.5
Downloading zipp-3.15.0-py3-none-any.whl (6.8 kB)
Collecting pytz>=2020.1
Downloading pytz-2023.3-py2.py3-none-any.whl (502 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 502.3/502.3 kB 2.0 MB/s eta 0:00:00
Collecting six>=1.5
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting markdown-it-py<3.0.0,>=2.2.0
Downloading markdown_it_py-2.2.0-py3-none-any.whl (84 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 84.5/84.5 kB 2.4 MB/s eta 0:00:00
Collecting pygments<3.0.0,>=2.13.0
Downloading Pygments-2.15.1-py3-none-any.whl (1.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 1.6 MB/s eta 0:00:00
Collecting attrs>=19.2.0
Downloading attrs-23.1.0-py3-none-any.whl (61 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 kB 3.3 MB/s eta 0:00:00
Collecting sortedcontainers
Downloading sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)
Collecting async-generator>=1.9
Downloading async_generator-1.10-py3-none-any.whl (18 kB)
Collecting outcome
Downloading outcome-1.2.0-py2.py3-none-any.whl (9.7 kB)
Collecting sniffio
Downloading sniffio-1.3.0-py3-none-any.whl (10 kB)
Collecting exceptiongroup
Downloading exceptiongroup-1.1.1-py3-none-any.whl (14 kB)
Collecting wsproto>=0.14
Downloading wsproto-1.2.0-py3-none-any.whl (24 kB)
Collecting pytz-deprecation-shim
Downloading pytz_deprecation_shim-0.1.0.post0-py2.py3-none-any.whl (15 kB)
Collecting decorator>=3.4.0
Downloading decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting smmap<6,>=3.0.1
Downloading smmap-5.0.0-py3-none-any.whl (24 kB)
Collecting MarkupSafe>=2.0
Downloading MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27 kB)
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
Downloading pyrsistent-0.19.3-py3-none-any.whl (57 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.5/57.5 kB 2.2 MB/s eta 0:00:00
Collecting mdurl~=0.1
Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Collecting h11<1,>=0.9.0
Downloading h11-0.14.0-py3-none-any.whl (58 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 2.5 MB/s eta 0:00:00
Collecting tzdata
Downloading tzdata-2023.3-py2.py3-none-any.whl (341 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 341.8/341.8 kB 1.8 MB/s eta 0:00:00
Installing collected packages: tls-client, SpeechRecognition, sortedcontainers, random-username, pytz, pyperclip, pydub, names, fake-useragent, zipp, websocket-client, watchdog, urllib3, tzdata, typing-extensions, tornado, toolz, toml, sniffio, smmap, six, rapidfuzz, PySocks, pyrsistent, pympler, pygments, pycparser, protobuf, pillow, packaging, numpy, mdurl, MarkupSafe, idna, h11, exceptiongroup, entrypoints, decorator, colorama, click, charset-normalizer, certifi, cachetools, blinker, attrs, async-generator, wsproto, validators, requests, pytz-deprecation-shim, python-dateutil, pydantic, pyarrow, outcome, markdown-it-py, Levenshtein, jsonschema, jinja2, importlib-metadata, gitdb, cffi, tzlocal, twocaptcha, trio, rich, pymailtm, pydeck, pandas, gitpython, curl_cffi, trio-websocket, altair, streamlit, selenium, streamlit-chat, pypasser
DEPRECATION: pyperclip is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for pyperclip: started
Running setup.py install for pyperclip: finished with status 'done'
DEPRECATION: names is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for names: started
Running setup.py install for names: finished with status 'done'
DEPRECATION: validators is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for validators: started
Running setup.py install for validators: finished with status 'done'
DEPRECATION: twocaptcha is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for twocaptcha: started
Running setup.py install for twocaptcha: finished with status 'done'
DEPRECATION: streamlit-chat is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for streamlit-chat: started
Running setup.py install for streamlit-chat: finished with status 'done'
DEPRECATION: pypasser is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for pypasser: started
Running setup.py install for pypasser: finished with status 'done'
Successfully installed Levenshtein-0.21.0 MarkupSafe-2.1.2 PySocks-1.7.1 SpeechRecognition-3.8.1 altair-4.2.2 async-generator-1.10 attrs-23.1.0 blinker-1.6.2 cachetools-5.3.0 certifi-2022.12.7 cffi-1.15.1 charset-normalizer-3.1.0 click-8.1.3 colorama-0.4.6 curl_cffi-0.5.5 decorator-5.1.1 entrypoints-0.4 exceptiongroup-1.1.1 fake-useragent-1.1.3 gitdb-4.0.10 gitpython-3.1.31 h11-0.14.0 idna-3.4 importlib-metadata-6.6.0 jinja2-3.1.2 jsonschema-4.17.3 markdown-it-py-2.2.0 mdurl-0.1.2 names-0.3.0 numpy-1.24.3 outcome-1.2.0 packaging-23.1 pandas-1.5.3 pillow-9.5.0 protobuf-3.20.3 pyarrow-12.0.0 pycparser-2.21 pydantic-1.10.7 pydeck-0.8.1b0 pydub-0.25.1 pygments-2.15.1 pymailtm-1.1.1 pympler-1.0.1 pypasser-0.0.5 pyperclip-1.8.2 pyrsistent-0.19.3 python-dateutil-2.8.2 pytz-2023.3 pytz-deprecation-shim-0.1.0.post0 random-username-1.0.2 rapidfuzz-3.0.0 requests-2.30.0 rich-13.3.5 selenium-4.9.0 six-1.16.0 smmap-5.0.0 sniffio-1.3.0 sortedcontainers-2.4.0 streamlit-1.21.0 streamlit-chat-0.0.2.2 tls-client-0.2.1 toml-0.10.2 toolz-0.12.0 tornado-6.3.1 trio-0.22.0 trio-websocket-0.10.2 twocaptcha-0.0.1 typing-extensions-4.5.0 tzdata-2023.3 tzlocal-4.3 urllib3-1.26.15 validators-0.20.0 watchdog-3.0.0 websocket-client-1.5.1 wsproto-1.2.0 zipp-3.15.0
[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip
Removing intermediate container 3e123eca3218
---> 5325cef46f22
Step 8/14 : FROM python:3.11
---> 815c8c75dfc0
Step 9/14 : WORKDIR /usr/app
---> Using cache
---> 187f412531cf
Step 10/14 : ENV PATH="/usr/app/venv/bin:$PATH"
---> Using cache
---> 4537399be190
Step 11/14 : COPY --from=builder /usr/app/venv ./venv
---> 0e270df67d1a
Step 12/14 : COPY . .
---> 32d49a7ef89c
Step 13/14 : CMD ["streamlit", "run", "gui/streamlit_app.py"]
---> Running in 8731975ecd42
Removing intermediate container 8731975ecd42
---> ea7ab9e9909c
Step 14/14 : EXPOSE 8501
---> Running in c1cbba76c503
Removing intermediate container c1cbba76c503
---> d87fd4679ef2
Successfully built d87fd4679ef2
build was successful but I used it the error...
I didn't have that error. It looks like the GUI library streamlit is creating two widget using the same key. I think it might be some parts of your code have run twice, especially for the copied files.
Have you tried to remove your folder, clone a new one, update the Dockerfile and re-build the docker package?
My Dockerfile:
FROM python:3.11 as builder
WORKDIR /usr/app
ENV PATH="/usr/app/venv/bin:$PATH"
#RUN apt-get update && apt-get install -y git
RUN mkdir -p /usr/app
RUN python -m venv ./venv
COPY requirements.txt .
RUN pip install -r requirements.txt
# RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
# RUN pip config set global.trusted-host mirrors.aliyun.com
FROM python:3.11
WORKDIR /usr/app
ENV PATH="/usr/app/venv/bin:$PATH"
COPY --from=builder /usr/app/venv ./venv
COPY . .
# RUN cp ./gui/streamlit_app.py .
CMD ["streamlit", "run", "gui/streamlit_chat_app.py"]
EXPOSE 8501
but there is No module name 'query_methods'
D:\Users\gpt4\gpt4free>pip install query_methods Looking in indexes: https://pypi.org/simple/ ERROR: Could not find a version that satisfies the requirement query_methods (from versions: none) ERROR: No matching distribution found for query_methods