Spaces:
Sleeping
Sleeping
feat: Run server and Streamlit app in Docker container
Browse files- Dockerfile +7 -4
- start.sh +3 -0
Dockerfile
CHANGED
|
@@ -19,8 +19,8 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 19 |
# Install PyAudio
|
| 20 |
RUN pip install PyAudio==0.2.14
|
| 21 |
|
| 22 |
-
# Make
|
| 23 |
-
EXPOSE 7860
|
| 24 |
|
| 25 |
# Set environment variable for API_URL
|
| 26 |
ENV API_URL=http://0.0.0.0:60808/chat
|
|
@@ -28,5 +28,8 @@ ENV API_URL=http://0.0.0.0:60808/chat
|
|
| 28 |
# Set PYTHONPATH
|
| 29 |
ENV PYTHONPATH=./
|
| 30 |
|
| 31 |
-
#
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
# Install PyAudio
|
| 20 |
RUN pip install PyAudio==0.2.14
|
| 21 |
|
| 22 |
+
# Make ports 7860 and 60808 available to the world outside this container
|
| 23 |
+
EXPOSE 7860 60808
|
| 24 |
|
| 25 |
# Set environment variable for API_URL
|
| 26 |
ENV API_URL=http://0.0.0.0:60808/chat
|
|
|
|
| 28 |
# Set PYTHONPATH
|
| 29 |
ENV PYTHONPATH=./
|
| 30 |
|
| 31 |
+
# Make start.sh executable
|
| 32 |
+
RUN chmod +x start.sh
|
| 33 |
+
|
| 34 |
+
# Run start.sh when the container launches
|
| 35 |
+
CMD ["./start.sh"]
|
start.sh
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
python3 server.py --ip '0.0.0.0' --port 60808 &
|
| 3 |
+
streamlit run webui/omni_streamlit.py --server.port 7860
|