Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +7 -4
Dockerfile
CHANGED
|
@@ -15,14 +15,17 @@ RUN pip install maturin
|
|
| 15 |
# Set working directory
|
| 16 |
WORKDIR /app
|
| 17 |
|
| 18 |
-
# Copy
|
| 19 |
COPY . .
|
| 20 |
|
| 21 |
-
#
|
|
|
|
|
|
|
|
|
|
| 22 |
RUN maturin build --release --manifest-path sample_rust/Cargo.toml
|
| 23 |
|
| 24 |
-
# Install the
|
| 25 |
RUN pip install sample_rust/target/wheels/*.whl
|
| 26 |
|
| 27 |
-
# Run your
|
| 28 |
CMD ["python3", "app.py"]
|
|
|
|
| 15 |
# Set working directory
|
| 16 |
WORKDIR /app
|
| 17 |
|
| 18 |
+
# Copy your project files (app.py, requirements.txt, sample_rust/)
|
| 19 |
COPY . .
|
| 20 |
|
| 21 |
+
# Install Python dependencies
|
| 22 |
+
RUN pip install -r requirements.txt
|
| 23 |
+
|
| 24 |
+
# Build Rust extension
|
| 25 |
RUN maturin build --release --manifest-path sample_rust/Cargo.toml
|
| 26 |
|
| 27 |
+
# Install the generated wheel
|
| 28 |
RUN pip install sample_rust/target/wheels/*.whl
|
| 29 |
|
| 30 |
+
# Run your Flask app
|
| 31 |
CMD ["python3", "app.py"]
|