Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
@@ -27,9 +27,9 @@ RUN CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
|
|
27 |
RUN CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 PIP_ROOT_USER_ACTION=ignore pip install --ignore-installed --timeout 100 -r requirements.txt
|
28 |
RUN pip install uvicorn
|
29 |
|
30 |
-
|
31 |
# # Switch to the "user" user
|
32 |
-
|
33 |
# # Set home to the user's home directory
|
34 |
# ENV HOME=/home/user \
|
35 |
# PATH=/home/user/.local/bin:$PATH \
|
@@ -44,7 +44,7 @@ RUN pip install uvicorn
|
|
44 |
# WORKDIR $HOME/app
|
45 |
|
46 |
# # Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
47 |
-
|
48 |
|
49 |
|
50 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
27 |
RUN CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 PIP_ROOT_USER_ACTION=ignore pip install --ignore-installed --timeout 100 -r requirements.txt
|
28 |
RUN pip install uvicorn
|
29 |
|
30 |
+
RUN useradd -m -u 1000 user
|
31 |
# # Switch to the "user" user
|
32 |
+
USER user
|
33 |
# # Set home to the user's home directory
|
34 |
# ENV HOME=/home/user \
|
35 |
# PATH=/home/user/.local/bin:$PATH \
|
|
|
44 |
# WORKDIR $HOME/app
|
45 |
|
46 |
# # Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
47 |
+
COPY --chown=user . .
|
48 |
|
49 |
|
50 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|