Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +18 -15
Dockerfile
CHANGED
|
@@ -1,12 +1,14 @@
|
|
| 1 |
# Base image
|
| 2 |
-
FROM
|
| 3 |
|
| 4 |
-
#
|
|
|
|
|
|
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
ffmpeg \
|
| 7 |
wget \
|
| 8 |
curl \
|
| 9 |
-
ca-certificates \
|
| 10 |
git \
|
| 11 |
libnss3 \
|
| 12 |
libatk1.0-0 \
|
|
@@ -29,22 +31,23 @@ RUN apt-get update && apt-get install -y \
|
|
| 29 |
libxshmfence1 \
|
| 30 |
libxext6 \
|
| 31 |
libx11-6 \
|
|
|
|
|
|
|
|
|
|
| 32 |
&& rm -rf /var/lib/apt/lists/*
|
| 33 |
|
| 34 |
-
#
|
| 35 |
-
|
| 36 |
|
| 37 |
-
#
|
| 38 |
-
|
| 39 |
-
RUN git clone https://github.com/IMaduwike/anime-sc /index
|
| 40 |
|
| 41 |
-
# Install
|
| 42 |
-
RUN
|
| 43 |
|
| 44 |
# Expose HF Space port
|
| 45 |
-
EXPOSE
|
| 46 |
-
ENV PORT=
|
| 47 |
-
ENV NODE_ENV=production
|
| 48 |
|
| 49 |
-
# Start
|
| 50 |
-
CMD ["
|
|
|
|
| 1 |
# Base image
|
| 2 |
+
FROM python:3.11-slim
|
| 3 |
|
| 4 |
+
# Set working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Install system dependencies for Playwright, FFmpeg, Chromium
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
ffmpeg \
|
| 10 |
wget \
|
| 11 |
curl \
|
|
|
|
| 12 |
git \
|
| 13 |
libnss3 \
|
| 14 |
libatk1.0-0 \
|
|
|
|
| 31 |
libxshmfence1 \
|
| 32 |
libxext6 \
|
| 33 |
libx11-6 \
|
| 34 |
+
gconf-service \
|
| 35 |
+
libxss1 \
|
| 36 |
+
libxcursor1 \
|
| 37 |
&& rm -rf /var/lib/apt/lists/*
|
| 38 |
|
| 39 |
+
# Copy Python code
|
| 40 |
+
COPY . /app
|
| 41 |
|
| 42 |
+
# Install Python dependencies
|
| 43 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 44 |
|
| 45 |
+
# Install Playwright browsers
|
| 46 |
+
RUN playwright install chromium
|
| 47 |
|
| 48 |
# Expose HF Space port
|
| 49 |
+
EXPOSE 7860
|
| 50 |
+
ENV PORT=7860
|
|
|
|
| 51 |
|
| 52 |
+
# Start FastAPI app with Uvicorn
|
| 53 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|