Spaces:
Sleeping
Sleeping
Write a few more things without testing
Browse files1. try one docker image
2. introduce a hacky way to run two services - uvicorn and streamlit
- Dockerfile +4 -2
- run.sh +6 -0
Dockerfile
CHANGED
@@ -11,7 +11,7 @@ COPY requirements.txt .
|
|
11 |
RUN pip install --trusted-host pypi.python.org -r requirements.txt
|
12 |
|
13 |
# Copy the rest of the application code into the container
|
14 |
-
COPY api .
|
15 |
|
16 |
# Expose the port the app runs on
|
17 |
EXPOSE 8080
|
@@ -20,5 +20,7 @@ EXPOSE 8080
|
|
20 |
ENV OPENAI_API_KEY=zzz
|
21 |
ENV QDRANT_URL="https://32f125d3-5ab1-4058-a10a-bd38a1ebd647.us-east-1-0.aws.cloud.qdrant.io"
|
22 |
ENV STORE="QDRANT"
|
|
|
|
|
23 |
# Start the application using Uvicorn
|
24 |
-
CMD ["
|
|
|
11 |
RUN pip install --trusted-host pypi.python.org -r requirements.txt
|
12 |
|
13 |
# Copy the rest of the application code into the container
|
14 |
+
COPY run.sh api fe .
|
15 |
|
16 |
# Expose the port the app runs on
|
17 |
EXPOSE 8080
|
|
|
20 |
ENV OPENAI_API_KEY=zzz
|
21 |
ENV QDRANT_URL="https://32f125d3-5ab1-4058-a10a-bd38a1ebd647.us-east-1-0.aws.cloud.qdrant.io"
|
22 |
ENV STORE="QDRANT"
|
23 |
+
ENV be_url="http://127.0.0.1:8080"
|
24 |
+
|
25 |
# Start the application using Uvicorn
|
26 |
+
CMD ["/bin/sh", "./run.sh"]
|
run.sh
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/sh
|
2 |
+
uvicorn "main:app" "--host" "0.0.0.0" "--port" "8080" &
|
3 |
+
streamlit run app.py
|
4 |
+
|
5 |
+
|
6 |
+
|