sreepathi-ravikumar commited on
Commit
08f09fa
·
verified ·
1 Parent(s): 213a727

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -32,12 +32,13 @@ 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
 
36
  COPY --chown=appuser:appuser rust_highlight /app/rust_highlight
37
  WORKDIR /app/rust_highlight
38
 
39
- # Compile and install Rust module into Python environment
40
- RUN . "$HOME/.cargo/env" && maturin develop --release
41
 
42
  # 6. Copy all application files
43
  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
+ # 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 ./