Spaces:
Sleeping
Sleeping
SAAHMATHWORKS commited on
Commit Β·
0deabde
1
Parent(s): d48aa10
dockerfile
Browse files- Dockerfile +7 -7
Dockerfile
CHANGED
|
@@ -10,19 +10,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
# Copy and install dependencies
|
| 13 |
-
COPY
|
| 14 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 15 |
pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
-
# Copy
|
| 18 |
-
COPY
|
| 19 |
|
| 20 |
-
#
|
| 21 |
RUN echo "π Contents of /app:" && ls -la && \
|
| 22 |
-
echo "π Contents of /app/models:" && ls -la models/ && \
|
| 23 |
-
echo "π Contents of /app/core:" && ls -la core/
|
| 24 |
|
| 25 |
-
# Create non-root user
|
| 26 |
RUN useradd -m -u 1000 user && chown -R user:user /app
|
| 27 |
USER user
|
| 28 |
|
|
|
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
# Copy and install dependencies
|
| 13 |
+
COPY requirements.txt .
|
| 14 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 15 |
pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
+
# Copy everything else
|
| 18 |
+
COPY . .
|
| 19 |
|
| 20 |
+
# Debug: verify what got copied
|
| 21 |
RUN echo "π Contents of /app:" && ls -la && \
|
| 22 |
+
echo "π Contents of /app/models:" && ls -la models/ || true && \
|
| 23 |
+
echo "π Contents of /app/core:" && ls -la core/ || true
|
| 24 |
|
| 25 |
+
# Create and switch to non-root user
|
| 26 |
RUN useradd -m -u 1000 user && chown -R user:user /app
|
| 27 |
USER user
|
| 28 |
|