Neon-AI commited on
Commit
8e12662
·
verified ·
1 Parent(s): 5ec4810

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -15
Dockerfile CHANGED
@@ -1,12 +1,14 @@
1
  # Base image
2
- FROM node:20-slim
3
 
4
- # Install system dependencies for Puppeteer and FFmpeg
 
 
 
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
- # Set working directory
35
- WORKDIR /index
36
 
37
- # Bust cache and clone latest commit from GitHub
38
- ADD "https://api.github.com/repos/IMaduwike/anime-sc/commits?per_page=1" /tmp/latest_commit
39
- RUN git clone https://github.com/IMaduwike/anime-sc /index
40
 
41
- # Install Node dependencies from cloned repo
42
- RUN npm install
43
 
44
  # Expose HF Space port
45
- EXPOSE 3000
46
- ENV PORT=3000
47
- ENV NODE_ENV=production
48
 
49
- # Start Node app
50
- CMD ["node", "index.js"]
 
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"]