seniruk commited on
Commit
d630c53
·
verified ·
1 Parent(s): 2f81069

Create Dcokerfile

Browse files
Files changed (1) hide show
  1. Dcokerfile +30 -0
Dcokerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a lightweight Linux base
2
+ FROM ubuntu:22.04
3
+
4
+ # Install minimal dependencies
5
+ RUN apt-get update && apt-get install -y --no-install-recommends \
6
+ python3 python3-pip unzip git \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ # Create non-root user for HF Spaces
10
+ RUN useradd -m -u 1000 user
11
+ USER user
12
+ ENV PATH="/home/user/.local/bin:$PATH"
13
+
14
+ # Set working directory
15
+ WORKDIR /app
16
+
17
+ # Copy the app, model, and binaries
18
+ COPY --chown=user . /app
19
+
20
+ # Make the binary executable
21
+ RUN chmod +x ./bin/llama-cli
22
+
23
+ # Install only Gradio (no llama-cpp-python needed)
24
+ RUN pip install --no-cache-dir gradio
25
+
26
+ # Expose Gradio default port
27
+ EXPOSE 7860
28
+
29
+ # Run the app
30
+ CMD ["python3", "app.py"]