Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +6 -2
Dockerfile
CHANGED
|
@@ -4,6 +4,10 @@ FROM python:3.9
|
|
| 4 |
# β
Set the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# β
Install system dependencies (FFmpeg for audio processing)
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
ffmpeg \
|
|
@@ -14,8 +18,8 @@ RUN apt-get update && apt-get install -y \
|
|
| 14 |
# β
Copy project files
|
| 15 |
COPY . .
|
| 16 |
|
| 17 |
-
# β
Install Python dependencies
|
| 18 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 19 |
|
| 20 |
# β
Expose required ports (FastAPI & Streamlit)
|
| 21 |
EXPOSE 7860 8501
|
|
|
|
| 4 |
# β
Set the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# β
Create a non-root user
|
| 8 |
+
RUN useradd -m appuser
|
| 9 |
+
USER appuser
|
| 10 |
+
|
| 11 |
# β
Install system dependencies (FFmpeg for audio processing)
|
| 12 |
RUN apt-get update && apt-get install -y \
|
| 13 |
ffmpeg \
|
|
|
|
| 18 |
# β
Copy project files
|
| 19 |
COPY . .
|
| 20 |
|
| 21 |
+
# β
Install Python dependencies inside user space
|
| 22 |
+
RUN pip install --no-cache-dir --user -r requirements.txt
|
| 23 |
|
| 24 |
# β
Expose required ports (FastAPI & Streamlit)
|
| 25 |
EXPOSE 7860 8501
|