Spaces:
Paused
Paused
Commit
·
c2cdb2d
1
Parent(s):
68bb241
New Dockerfile, still dummy app, testing minimal req file. Fixed REAMDME v4
Browse files- Dockerfile +7 -2
Dockerfile
CHANGED
|
@@ -6,8 +6,10 @@ WORKDIR /app
|
|
| 6 |
# Copy requirements first to leverage Docker cache
|
| 7 |
COPY requirements.txt .
|
| 8 |
|
| 9 |
-
# Install dependencies
|
| 10 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
| 11 |
|
| 12 |
# Copy only what's needed
|
| 13 |
COPY main/ ./main/
|
|
@@ -16,6 +18,9 @@ COPY main/ ./main/
|
|
| 16 |
ENV PYTHONPATH=/app
|
| 17 |
ENV PYTHONUNBUFFERED=1
|
| 18 |
|
|
|
|
|
|
|
|
|
|
| 19 |
# Expose the port
|
| 20 |
EXPOSE 7680
|
| 21 |
|
|
|
|
| 6 |
# Copy requirements first to leverage Docker cache
|
| 7 |
COPY requirements.txt .
|
| 8 |
|
| 9 |
+
# Install dependencies and clean cache
|
| 10 |
+
RUN pip install --no-cache-dir -r requirements.txt && \
|
| 11 |
+
rm -rf /root/.cache/huggingface && \
|
| 12 |
+
rm -rf /root/.cache/pip
|
| 13 |
|
| 14 |
# Copy only what's needed
|
| 15 |
COPY main/ ./main/
|
|
|
|
| 18 |
ENV PYTHONPATH=/app
|
| 19 |
ENV PYTHONUNBUFFERED=1
|
| 20 |
|
| 21 |
+
# Clear any cache that might have been created
|
| 22 |
+
RUN rm -rf ~/.cache/huggingface
|
| 23 |
+
|
| 24 |
# Expose the port
|
| 25 |
EXPOSE 7680
|
| 26 |
|