sreepathi-ravikumar commited on
Commit
239dc1e
·
verified ·
1 Parent(s): 03707a7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -2
Dockerfile CHANGED
@@ -32,13 +32,19 @@ USER appuser
32
  COPY --chown=appuser:appuser requirements.txt .
33
  RUN pip install --no-cache-dir -r requirements.txt
34
 
35
- # Copy and build the Rust module using maturin (as root)
36
  USER root
37
  COPY --chown=appuser:appuser rust_highlight /app/rust_highlight
38
  WORKDIR /app/rust_highlight
39
 
40
  ENV PATH="/root/.cargo/bin:${PATH}"
41
- RUN maturin develop --release
 
 
 
 
 
 
42
 
43
  # 6. Copy all application files
44
  COPY --chown=appuser:appuser app.py image_fetcher.py video.py video2.py ./
 
32
  COPY --chown=appuser:appuser requirements.txt .
33
  RUN pip install --no-cache-dir -r requirements.txt
34
 
35
+ # --- RUST BUILD START ---
36
  USER root
37
  COPY --chown=appuser:appuser rust_highlight /app/rust_highlight
38
  WORKDIR /app/rust_highlight
39
 
40
  ENV PATH="/root/.cargo/bin:${PATH}"
41
+ RUN maturin build --release --manifest-path Cargo.toml
42
+ RUN pip install target/wheels/*.whl
43
+
44
+ # Go back to app setup
45
+ USER appuser
46
+ WORKDIR /app
47
+ # --- RUST BUILD END ---
48
 
49
  # 6. Copy all application files
50
  COPY --chown=appuser:appuser app.py image_fetcher.py video.py video2.py ./