Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +15 -0
Dockerfile
CHANGED
|
@@ -34,6 +34,21 @@ RUN mkdir -p /workspaces/empty/build/bin && \
|
|
| 34 |
# Make sure binaries are executable
|
| 35 |
RUN chmod +x /workspaces/empty/build/bin/*
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
# Step 4 & 5: Set Environment Variables for PATH and LD_LIBRARY_PATH
|
| 38 |
ENV PATH="/workspaces/empty/build/bin:${PATH}"
|
| 39 |
ENV LD_LIBRARY_PATH="/workspaces/empty/build/bin:${LD_LIBRARY_PATH}"
|
|
|
|
| 34 |
# Make sure binaries are executable
|
| 35 |
RUN chmod +x /workspaces/empty/build/bin/*
|
| 36 |
|
| 37 |
+
# Create cache directory and set permissions
|
| 38 |
+
RUN mkdir -p /.cache/llama.cpp && \
|
| 39 |
+
chmod -R 777 /.cache
|
| 40 |
+
|
| 41 |
+
# Create a non-root user for running the application
|
| 42 |
+
RUN groupadd -r llama && useradd -r -g llama llama && \
|
| 43 |
+
mkdir -p /home/llama/.cache/llama.cpp && \
|
| 44 |
+
chown -R llama:llama /home/llama
|
| 45 |
+
|
| 46 |
+
# Set environment variable for cache directory
|
| 47 |
+
ENV XDG_CACHE_HOME=/home/llama/.cache
|
| 48 |
+
|
| 49 |
+
# Switch to non-root user
|
| 50 |
+
USER llama
|
| 51 |
+
|
| 52 |
# Step 4 & 5: Set Environment Variables for PATH and LD_LIBRARY_PATH
|
| 53 |
ENV PATH="/workspaces/empty/build/bin:${PATH}"
|
| 54 |
ENV LD_LIBRARY_PATH="/workspaces/empty/build/bin:${LD_LIBRARY_PATH}"
|