Open OliverOffing opened 4 months ago
Btw, the current Dockerfile wasn't building for me, so I'm using this one:
diff --git i/Dockerfile w/Dockerfile
index 58d889f..6bfe067 100644
--- i/Dockerfile
+++ w/Dockerfile
@@ -1,20 +1,27 @@
# Use an official Python base image from the Docker Hub
-FROM python:3-alpine AS loopgpt-base
-
-# Install browsers
-RUN apk update && apk add --no-cache \
- firefox \
- ca-certificates
-
-# Install utilities
-RUN apk add --no-cache curl jq wget git gcc g++ libc-dev bash
+FROM python:3.10-slim AS loopgpt-base
+
+# Install browsers and utilities
+RUN apt-get update && apt-get install -y --no-install-recommends \
+ firefox-esr \
+ ca-certificates \
+ curl \
+ jq \
+ wget \
+ git \
+ gcc \
+ g++ \
+ libc-dev \
+ bash && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
# Set environment variables
ENV PIP_NO_CACHE_DIR=yes \
PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
-RUN adduser -D -g gpt -s /bin/bash gpt
+RUN adduser --disabled-password --gecos "" gpt
WORKDIR /app
COPY requirements.txt setup.py ./
Please check that this issue hasn't been reported before.
Expected Behavior
Google search should return search results
Current behaviour
Google search failed with error: <HttpError 400 when requesting https://customsearch.googleapis.com/customsearch/v1?q=latest+btc+price&num=8&start=1&key=AIzaSyAntxjXqFKmJf0l7zCU7fsl7TmtqWgJk1k+&alt=json returned "Request contains an invalid argument.". Details: "[{'message': 'Request contains an invalid argument.', 'domain': 'global', 'reason': 'badRequest'}]"> Trying DuckDuckGo search instead...
Steps to reproduce
CUSTOM_SEARCH_ENGINE_ID
andGOOGLE_API_KEY
Possible solution
It seems we need to update some library perhaps. Ultimately it feels like we need to move away from
requirements.txt
into something likepdm
which uses a lockfile. Or at least the very least set up specific versions inrequirements.txt
.Which Operating Systems are you using?
Python Version
LoopGPT Version
latest
Acknowledgements