AUXteam commited on
Commit
b7a002d
·
verified ·
1 Parent(s): 1fd158f

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -15
Dockerfile CHANGED
@@ -1,6 +1,5 @@
1
  FROM node:22
2
 
3
- # Install dependencies, Chromium, Python and pip
4
  RUN apt-get update && apt-get install -y \
5
  chromium \
6
  python3 \
@@ -11,29 +10,17 @@ RUN apt-get update && apt-get install -y \
11
  --no-install-recommends \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
- # Set environment variables
15
  ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
16
  PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium \
17
  NODE_PORT=3000
18
 
19
  WORKDIR /app
20
-
21
- # Copy package files and install Node dependencies
22
  COPY package*.json ./
23
  RUN node -e "const fs = require('fs'); const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); pkg.scripts.prepare = ''; pkg.scripts.start = 'node dist/app.js'; pkg.dependencies.express = '^4.18.2'; pkg.devDependencies['@types/express'] = '^4.17.17'; fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));"
24
  RUN npm install --legacy-peer-deps
25
-
26
- # Install Python dependencies
27
  RUN pip3 install --break-system-packages gradio requests
28
-
29
- # Copy all source
30
  COPY . .
31
-
32
- # Build Node application
33
  RUN npm run build
34
-
35
- # Expose the Gradio port
36
  EXPOSE 7860
37
-
38
- # Start script
39
- CMD ["./start.sh"]
 
1
  FROM node:22
2
 
 
3
  RUN apt-get update && apt-get install -y \
4
  chromium \
5
  python3 \
 
10
  --no-install-recommends \
11
  && rm -rf /var/lib/apt/lists/*
12
 
 
13
  ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
14
  PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium \
15
  NODE_PORT=3000
16
 
17
  WORKDIR /app
 
 
18
  COPY package*.json ./
19
  RUN node -e "const fs = require('fs'); const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); pkg.scripts.prepare = ''; pkg.scripts.start = 'node dist/app.js'; pkg.dependencies.express = '^4.18.2'; pkg.devDependencies['@types/express'] = '^4.17.17'; fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));"
20
  RUN npm install --legacy-peer-deps
 
 
21
  RUN pip3 install --break-system-packages gradio requests
 
 
22
  COPY . .
 
 
23
  RUN npm run build
24
+ RUN chmod +x start.sh
 
25
  EXPOSE 7860
26
+ CMD ["/bin/bash", "./start.sh"]