Update Dockerfile
Browse files- Dockerfile +8 -3
Dockerfile
CHANGED
|
@@ -1,7 +1,10 @@
|
|
| 1 |
FROM pytorch/pytorch:latest
|
| 2 |
|
|
|
|
|
|
|
| 3 |
# Set working directory
|
| 4 |
WORKDIR /app
|
|
|
|
| 5 |
|
| 6 |
# Install system dependencies
|
| 7 |
RUN apt-get update && apt-get install -y \
|
|
@@ -15,9 +18,11 @@ RUN pip install byaldi qwen-vl-utils
|
|
| 15 |
|
| 16 |
# Copy your application code
|
| 17 |
COPY app.py .
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
| 21 |
# Expose the port the app runs on
|
| 22 |
EXPOSE 8000
|
| 23 |
|
|
|
|
| 1 |
FROM pytorch/pytorch:latest
|
| 2 |
|
| 3 |
+
RUN useradd -m -u 1000 user
|
| 4 |
+
USER user
|
| 5 |
# Set working directory
|
| 6 |
WORKDIR /app
|
| 7 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
| 8 |
|
| 9 |
# Install system dependencies
|
| 10 |
RUN apt-get update && apt-get install -y \
|
|
|
|
| 18 |
|
| 19 |
# Copy your application code
|
| 20 |
COPY app.py .
|
| 21 |
+
|
| 22 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
| 23 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 24 |
+
|
| 25 |
+
COPY --chown=user . /app
|
| 26 |
# Expose the port the app runs on
|
| 27 |
EXPOSE 8000
|
| 28 |
|