add user path
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
|
@@ -12,15 +12,16 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
| 12 |
WORKDIR /app
|
| 13 |
|
| 14 |
# Copy your app
|
| 15 |
-
COPY
|
| 16 |
-
|
| 17 |
# Install Python deps
|
| 18 |
-
|
| 19 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
# Expose the port Hugging Face expects
|
| 23 |
EXPOSE 7860
|
| 24 |
-
|
| 25 |
# Run your app (it will read $PORT below)
|
| 26 |
CMD ["gunicorn", "-k", "eventlet", "-w", "1", "-b", "0.0.0.0:7860", "app:app"]
|
|
|
|
| 12 |
WORKDIR /app
|
| 13 |
|
| 14 |
# Copy your app
|
| 15 |
+
COPY ./requirements.txt /app/requirements.txt
|
|
|
|
| 16 |
# Install Python deps
|
| 17 |
+
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
|
|
|
|
| 18 |
|
| 19 |
+
RUN useradd -m -u 1000 user
|
| 20 |
+
USER user
|
| 21 |
+
ENV PATH="/home/user/.local/bin:${PATH}"
|
| 22 |
+
COPY --chown=user . /app
|
| 23 |
|
| 24 |
# Expose the port Hugging Face expects
|
| 25 |
EXPOSE 7860
|
|
|
|
| 26 |
# Run your app (it will read $PORT below)
|
| 27 |
CMD ["gunicorn", "-k", "eventlet", "-w", "1", "-b", "0.0.0.0:7860", "app:app"]
|