Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- 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 |
-
#
|
| 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 ./
|