Xianbao QIAN commited on
Commit
754b5f8
1 Parent(s): 16bec5a

update package

Browse files
Files changed (2) hide show
  1. Dockerfile +22 -1
  2. requirements.txt +2 -1
Dockerfile CHANGED
@@ -1,4 +1,25 @@
1
  # syntax=docker/dockerfile:1.4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  FROM oven/bun:1 AS base
4
 
@@ -35,7 +56,7 @@ RUN \
35
  adduser --system --uid 1001 nextjs
36
 
37
  # Public files are served by nextjs.
38
- COPY --from=builder --link /app/public ./public
39
 
40
  # Automatically leverage output traces to reduce image size
41
  COPY --from=builder --link --chown=1001:1001 /app/.next/standalone ./
 
1
  # syntax=docker/dockerfile:1.4
2
+ # Python stage for running Python scripts
3
+ FROM python:3.9-slim AS python-runner
4
+
5
+ WORKDIR /app
6
+
7
+ # Copy requirements.txt and install dependencies
8
+ COPY --link requirements.txt .
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
+
11
+ # Copy Python scripts
12
+ COPY --link python/ ./python/
13
+
14
+ # Run all Python scripts in order
15
+ RUN for script in $(ls -1 python/*.py | sort); do python $script; done
16
+
17
+
18
+ # Base stage
19
+ FROM oven/bun:1 AS base
20
+
21
+ # # Copy Python output files to the base image
22
+ # COPY --from=python-runner --link /tmp/python_output /app/python_output/
23
 
24
  FROM oven/bun:1 AS base
25
 
 
56
  adduser --system --uid 1001 nextjs
57
 
58
  # Public files are served by nextjs.
59
+ COPY --from=python-runner --link /app/public ./public
60
 
61
  # Automatically leverage output traces to reduce image size
62
  COPY --from=builder --link --chown=1001:1001 /app/.next/standalone ./
requirements.txt CHANGED
@@ -2,4 +2,5 @@ requests
2
  tqdm
3
  duckdb
4
  pyarrow
5
- pandas
 
 
2
  tqdm
3
  duckdb
4
  pyarrow
5
+ pandas
6
+ pyyaml