diff --git a/application/Dockerfile b/application/Dockerfile index bd8f09de..3e2b1d63 100644 --- a/application/Dockerfile +++ b/application/Dockerfile @@ -8,18 +8,16 @@ RUN pip install --upgrade pip && pip install tiktoken==0.3.3 COPY requirements.txt . RUN pip install -r requirements.txt - FROM python:3.10-slim-bullseye -# Copy pre-built packages from builder stage -COPY --from=builder /usr/local/lib/python3.10/site-packages/ /usr/local/lib/python3.10/site-packages/ -RUN pip install gunicorn==20.1.0 -RUN pip install celery==5.2.7 + +# Copy pre-built packages and binaries from builder stage +COPY --from=builder /usr/local/ /usr/local/ + WORKDIR /app COPY . /app ENV FLASK_APP=app.py ENV FLASK_DEBUG=true - EXPOSE 5001 CMD ["gunicorn", "-w", "2", "--timeout", "120", "--bind", "0.0.0.0:5001", "wsgi:app"] diff --git a/application/requirements.txt b/application/requirements.txt index dda008c0..ad80334a 100644 --- a/application/requirements.txt +++ b/application/requirements.txt @@ -10,7 +10,7 @@ billiard==3.6.4.0 blobfile==2.0.1 boto3==1.26.102 botocore==1.29.102 -celery +celery==5.2.7 cffi==1.15.1 charset-normalizer==3.1.0 click==8.1.3 @@ -31,6 +31,7 @@ Flask==2.2.3 Flask-Cors==3.0.10 frozenlist==1.3.3 geojson==2.5.0 +gunicorn==20.1.0 greenlet==2.0.2 gpt4all==0.1.7 hub==3.0.1 diff --git a/docker-compose.yaml b/docker-compose.yaml index f36fd101..c9557dc5 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,6 +1,15 @@ version: "3.9" services: + frontend: + build: ./frontend + environment: + - VITE_API_HOST=http://localhost:5001 + - VITE_API_STREAMING=$VITE_API_STREAMING + ports: + - "5173:5173" + depends_on: + - backend backend: build: ./application