Update Dockerfile
Browse files- Dockerfile +2 -3
Dockerfile
CHANGED
|
@@ -18,7 +18,7 @@ RUN apt-get update -y && \
|
|
| 18 |
# Ensure /app is writable by the non-root user
|
| 19 |
RUN chown user:user /app
|
| 20 |
|
| 21 |
-
# Create a directory for model weights
|
| 22 |
RUN mkdir -p /app/models && chown user:user /app/models
|
| 23 |
|
| 24 |
# Switch back to the non-root user
|
|
@@ -28,9 +28,8 @@ USER user
|
|
| 28 |
COPY --chown=user ./requirements.txt requirements.txt
|
| 29 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 30 |
|
| 31 |
-
# Copy the rest of the application code
|
| 32 |
COPY --chown=user . /app
|
| 33 |
-
COPY --chown=user ./models/resnet50-0676ba61.pth /app/models/resnet50-0676ba61.pth
|
| 34 |
|
| 35 |
# Set the command to run the application
|
| 36 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 18 |
# Ensure /app is writable by the non-root user
|
| 19 |
RUN chown user:user /app
|
| 20 |
|
| 21 |
+
# Create a directory for model weights (optional, if you plan to add models later)
|
| 22 |
RUN mkdir -p /app/models && chown user:user /app/models
|
| 23 |
|
| 24 |
# Switch back to the non-root user
|
|
|
|
| 28 |
COPY --chown=user ./requirements.txt requirements.txt
|
| 29 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 30 |
|
| 31 |
+
# Copy the rest of the application code
|
| 32 |
COPY --chown=user . /app
|
|
|
|
| 33 |
|
| 34 |
# Set the command to run the application
|
| 35 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|