Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +4 -8
Dockerfile
CHANGED
|
@@ -12,18 +12,14 @@ RUN apt-get update && apt-get install -y \
|
|
| 12 |
libportaudio2 \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
-
# Copy
|
| 16 |
COPY . .
|
| 17 |
|
| 18 |
# Install Python dependencies
|
| 19 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
ENV STREAMLIT_SERVER_HEADLESS=true
|
| 23 |
-
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
|
| 24 |
-
|
| 25 |
-
# Expose port for Streamlit
|
| 26 |
EXPOSE 7860
|
| 27 |
|
| 28 |
-
# Start with your
|
| 29 |
-
CMD ["
|
|
|
|
| 12 |
libportaudio2 \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
+
# Copy app code
|
| 16 |
COPY . .
|
| 17 |
|
| 18 |
# Install Python dependencies
|
| 19 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 20 |
|
| 21 |
+
# Expose the FastAPI port
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
+
# Start FastAPI with uvicorn (your app must define: app = FastAPI())
|
| 25 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|