Spaces:
Runtime error
Runtime error
Added missing Dockerfile + README update
Browse files- Dockerfile +34 -0
- README.md +2 -2
Dockerfile
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use multi-stage builds to reduce the size of the final image
|
2 |
+
FROM python:3.10-slim as builder
|
3 |
+
|
4 |
+
ENV PYTHONFAULTHANDLER=1 \
|
5 |
+
PYTHONUNBUFFERED=1 \
|
6 |
+
PYTHONDONTWRITEBYTECODE=1 \
|
7 |
+
POETRY_VERSION=1.5.1 \
|
8 |
+
PIP_NO_CACHE_DIR=1
|
9 |
+
|
10 |
+
WORKDIR /app
|
11 |
+
|
12 |
+
RUN apt-get update && apt-get install -y \
|
13 |
+
build-essential \
|
14 |
+
curl \
|
15 |
+
software-properties-common \
|
16 |
+
&& rm -rf /var/lib/apt/lists/* \
|
17 |
+
&& pip install "poetry==$POETRY_VERSION"
|
18 |
+
|
19 |
+
RUN pip install -r requirements.txt
|
20 |
+
|
21 |
+
|
22 |
+
FROM python:3.10-slim
|
23 |
+
|
24 |
+
WORKDIR /app
|
25 |
+
|
26 |
+
COPY --from=builder /app /app
|
27 |
+
|
28 |
+
COPY /knowledge_gpt ./knowledge_gpt
|
29 |
+
|
30 |
+
ENV PATH="/app/.venv/bin:$PATH"
|
31 |
+
|
32 |
+
EXPOSE 8501
|
33 |
+
|
34 |
+
CMD ["python", "-m", "streamlit", "run", "knowledge_gpt/main.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
README.md
CHANGED
@@ -26,7 +26,7 @@ app_file: knowledge_gpt/main.py
|
|
26 |
| **File size check** | [](https://github.com/andreped/referencebot/actions) |
|
27 |
|
28 |
|
29 |
-
|
30 |
|
31 |
Follow the instructions below to run the Streamlit server locally.
|
32 |
|
@@ -70,7 +70,7 @@ ENGINE_EMBEDDING = "<insert deployment embedding name>"
|
|
70 |
streamlit run knowledge_gpt/main.py
|
71 |
```
|
72 |
|
73 |
-
|
74 |
|
75 |
Run the following commands to build and run the Docker image.
|
76 |
|
|
|
26 |
| **File size check** | [](https://github.com/andreped/referencebot/actions) |
|
27 |
|
28 |
|
29 |
+
## [Installation](https://github.com/andreped/referencebot#installation)
|
30 |
|
31 |
Follow the instructions below to run the Streamlit server locally.
|
32 |
|
|
|
70 |
streamlit run knowledge_gpt/main.py
|
71 |
```
|
72 |
|
73 |
+
## [Build with Docker](https://github.com/andreped/referencebot#build-with-docker)
|
74 |
|
75 |
Run the following commands to build and run the Docker image.
|
76 |
|