Spaces:
Sleeping
Sleeping
wjm55
commited on
Commit
·
7aee21c
1
Parent(s):
79fe766
Refactor Dockerfile: Simplify requirements copying and installation process
Browse files- Dockerfile +5 -3
Dockerfile
CHANGED
|
@@ -8,11 +8,13 @@ ENV PATH="/home/user/.local/bin:$PATH"
|
|
| 8 |
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
-
# Copy requirements first
|
| 12 |
-
COPY
|
|
|
|
|
|
|
| 13 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 14 |
|
| 15 |
# Copy the rest of the application
|
| 16 |
-
COPY
|
| 17 |
|
| 18 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 8 |
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
+
# Copy requirements.txt file first
|
| 12 |
+
COPY requirements.txt /app/
|
| 13 |
+
|
| 14 |
+
# Install dependencies
|
| 15 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 16 |
|
| 17 |
# Copy the rest of the application
|
| 18 |
+
COPY . /app
|
| 19 |
|
| 20 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|