Carbaz commited on
Commit
0dfc197
·
verified ·
1 Parent(s): 8ecbccb

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
+ # you will also find guides on how best to write your Dockerfile
3
+
4
+ FROM python:3.13
5
+
6
+ # Install system utilities
7
+ RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
8
+
9
+ RUN useradd -m -u 1000 user
10
+ USER user
11
+ ENV PATH="/home/user/.local/bin:$PATH"
12
+
13
+ WORKDIR /app
14
+
15
+ # --- CONFIGURATION ---
16
+ # Default is the stable 'gradio' from PyPI.
17
+ # Replace with the .whl URL from the PR bot to test changes:
18
+ # 1. Go to the Gradio PR on GitHub
19
+ # 2. Find the "PR wheel preview build" check at the bottom
20
+ # 3. Click "Details" and copy the .whl URL from the logs
21
+ ARG INSTALL_TARGET="gradio"
22
+
23
+ # Install uvicorn (needed for the CMD) and the specific Gradio PR build
24
+ RUN pip install --no-cache-dir --upgrade uvicorn ${INSTALL_TARGET}
25
+
26
+ COPY --chown=user . /app
27
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]