Spaces:
Running
Running
lucianotonet
commited on
Commit
•
04a5565
1
Parent(s):
f0feeda
Refine Dockerfile setup and user context
Browse filesAdjust the Dockerfile to execute further commands under the newly created user for improved security and isolation. Dropped an unnecessary command that attempted separate runs within a single command line, streamlining the execution process. These modifications enhance the environment consistency and ensure a smoother setup for the application.
- Dockerfile +2 -4
Dockerfile
CHANGED
@@ -5,6 +5,7 @@ RUN apt-get update && apt-get install curl -y
|
|
5 |
# https://huggingface.co/docs/hub/spaces-sdks-docker-first-demo
|
6 |
RUN useradd -m -u 1000 user
|
7 |
|
|
|
8 |
ENV HOME=/home/user \
|
9 |
PATH=/home/user/.local/bin:$PATH \
|
10 |
OLLAMA_HOST=0.0.0.0
|
@@ -13,9 +14,6 @@ WORKDIR $HOME/app
|
|
13 |
|
14 |
COPY --chown=user:user Modelfile $HOME/app/
|
15 |
|
16 |
-
RUN ollama serve & sleep 10 &&
|
17 |
-
ollama pull llama3.1 && \
|
18 |
-
ollama create LlamaClaude -f ./Modelfile && \
|
19 |
-
ollama ps
|
20 |
|
21 |
EXPOSE 11434
|
|
|
5 |
# https://huggingface.co/docs/hub/spaces-sdks-docker-first-demo
|
6 |
RUN useradd -m -u 1000 user
|
7 |
|
8 |
+
USER user
|
9 |
ENV HOME=/home/user \
|
10 |
PATH=/home/user/.local/bin:$PATH \
|
11 |
OLLAMA_HOST=0.0.0.0
|
|
|
14 |
|
15 |
COPY --chown=user:user Modelfile $HOME/app/
|
16 |
|
17 |
+
RUN ollama serve & sleep 10 && RUN ollama pull llama3.1 && ollama create LlamaClaude -f ./Modelfile
|
|
|
|
|
|
|
18 |
|
19 |
EXPOSE 11434
|