Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +1 -7
Dockerfile
CHANGED
|
@@ -1,26 +1,20 @@
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
-
# Install system dependencies
|
| 4 |
-
# libmagic1 is required for python-magic (media detection)
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
ffmpeg \
|
| 7 |
fonts-dejavu-core \
|
| 8 |
libmagic1 \
|
| 9 |
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
-
# Setup User
|
| 12 |
RUN useradd -m -u 1000 user
|
| 13 |
USER user
|
| 14 |
WORKDIR /home/user/app
|
| 15 |
ENV PATH="/home/user/.local/bin:$PATH"
|
| 16 |
|
| 17 |
-
# Install Python stack
|
| 18 |
COPY --chown=user:user requirements.txt .
|
| 19 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 20 |
|
| 21 |
-
# Copy application and create temp directory
|
| 22 |
COPY --chown=user:user . .
|
| 23 |
RUN mkdir -p /home/user/app/temp
|
| 24 |
|
| 25 |
-
|
| 26 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
|
|
|
|
|
|
| 3 |
RUN apt-get update && apt-get install -y \
|
| 4 |
ffmpeg \
|
| 5 |
fonts-dejavu-core \
|
| 6 |
libmagic1 \
|
| 7 |
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 8 |
|
|
|
|
| 9 |
RUN useradd -m -u 1000 user
|
| 10 |
USER user
|
| 11 |
WORKDIR /home/user/app
|
| 12 |
ENV PATH="/home/user/.local/bin:$PATH"
|
| 13 |
|
|
|
|
| 14 |
COPY --chown=user:user requirements.txt .
|
| 15 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
|
|
|
| 17 |
COPY --chown=user:user . .
|
| 18 |
RUN mkdir -p /home/user/app/temp
|
| 19 |
|
| 20 |
+
CMD ["python", "app.py"]
|
|
|