Spaces:
Runtime error
Runtime error
Updated Dockerfile for GPU Dependencies
Browse files- Dockerfile +12 -12
Dockerfile
CHANGED
@@ -62,15 +62,15 @@ USER root
|
|
62 |
COPY ./requirements.txt /code/requirements.txt
|
63 |
RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
|
64 |
|
65 |
-
#
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
#
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
#
|
76 |
-
|
|
|
62 |
COPY ./requirements.txt /code/requirements.txt
|
63 |
RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
|
64 |
|
65 |
+
# Create a non-root user and set environment variables
|
66 |
+
RUN useradd -m -u 1000 user
|
67 |
+
USER user
|
68 |
+
ENV HOME=/home/user \
|
69 |
+
PATH=/home/user/.local/bin:$PATH
|
70 |
+
|
71 |
+
# Set the working directory and copy your application files
|
72 |
+
WORKDIR $HOME/app
|
73 |
+
COPY --chown=user . $HOME/app
|
74 |
+
|
75 |
+
# Specify the command to run your application
|
76 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|