ryding commited on
Commit
d74d3fa
·
verified ·
1 Parent(s): b702164

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -0
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:12.3.2-cudnn9-devel-ubuntu22.04
2
+
3
+ # Install Python 3.11 and system dependencies
4
+ RUN apt-get update && \
5
+ apt-get install -y software-properties-common && \
6
+ add-apt-repository ppa:deadsnakes/ppa && \
7
+ apt-get update && \
8
+ apt-get install -y python3.11 python3.11-pip python3.11-dev && \
9
+ rm -rf /var/lib/apt/lists/*
10
+
11
+ # Set up user (HF Spaces requirement)
12
+ RUN useradd -m -u 1000 user
13
+ USER user
14
+ ENV HOME=/home/user \
15
+ PATH=/home/user/.local/bin:$PATH
16
+
17
+ WORKDIR $HOME/app
18
+
19
+ # Copy application files
20
+ COPY --chown=user . $HOME/app
21
+
22
+ # Install Python dependencies WITHOUT mcp
23
+ RUN python3.11 -m pip install --no-cache-dir \
24
+ gradio==5.49.1 \
25
+ uvicorn>=0.14.0 \
26
+ spaces
27
+
28
+ # Install your custom requirements
29
+ RUN python3.11 -m pip install --no-cache-dir -r requirements.txt
30
+
31
+ # Expose Gradio port
32
+ EXPOSE 7860
33
+
34
+ # Run the app
35
+ CMD ["python3.11", "app.py"]