victor HF Staff commited on
Commit
875bcff
·
1 Parent(s): afde5c9

feat: Add Dockerfile to serve Streamlit app on port 7860

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.10-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ ffmpeg \
10
+ portaudio19-dev \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ # Copy the current directory contents into the container at /app
14
+ COPY . /app
15
+
16
+ # Install any needed packages specified in requirements.txt
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+
19
+ # Install PyAudio
20
+ RUN pip install PyAudio==0.2.14
21
+
22
+ # Make port 7860 available to the world outside this container
23
+ EXPOSE 7860
24
+
25
+ # Set environment variable for API_URL
26
+ ENV API_URL=http://0.0.0.0:60808/chat
27
+
28
+ # Set PYTHONPATH
29
+ ENV PYTHONPATH=./
30
+
31
+ # Run streamlit when the container launches
32
+ CMD ["streamlit", "run", "webui/omni_streamlit.py", "--server.port", "7860"]