Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -6
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
FROM python:3.9
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
@@ -11,14 +11,16 @@ RUN apt-get update && apt-get install -y \
|
|
| 11 |
python3-pybind11 \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
-
# Copy
|
| 15 |
-
COPY requirements.txt
|
| 16 |
-
|
| 17 |
-
# Install Python requirements
|
| 18 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 19 |
|
| 20 |
-
#
|
|
|
|
| 21 |
RUN pip install -e .
|
| 22 |
|
|
|
|
|
|
|
|
|
|
| 23 |
# Run the application
|
| 24 |
CMD ["streamlit", "run", "app.py"]
|
|
|
|
| 1 |
+
FROM python:3.9
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 11 |
python3-pybind11 \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
+
# Copy and install requirements first (for better caching)
|
| 15 |
+
COPY requirements.txt .
|
|
|
|
|
|
|
| 16 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
+
# Copy C++ extension files and build them
|
| 19 |
+
COPY cubic_cpp.cpp setup.py .
|
| 20 |
RUN pip install -e .
|
| 21 |
|
| 22 |
+
# Copy the rest of the application
|
| 23 |
+
COPY . .
|
| 24 |
+
|
| 25 |
# Run the application
|
| 26 |
CMD ["streamlit", "run", "app.py"]
|