chenx906 commited on
Commit
fc0e2f5
·
1 Parent(s): 95ec74e

Fix the deployment space problem

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -9
  2. app.py → api/app.py +0 -0
Dockerfile CHANGED
@@ -1,24 +1,16 @@
1
  FROM python:3.9-slim
2
-
3
- # 1) Create user & workdir
4
  RUN useradd -m -u 1000 user
5
  WORKDIR /app
6
 
7
- # 2) Install deps
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
- # Gradio is required by your api/app.py
11
  RUN pip install gradio torch pillow requests
12
 
13
- # 3) Copy your project
14
  COPY --chown=user:user . .
15
 
16
- # 4) Permissions & user
17
  RUN chown -R user:user /app
18
  USER user
19
-
20
- # 5) Expose Hugging Face Spaces port
21
  EXPOSE 7860
22
 
23
- # 6) Run your Gradio app directly (NOT uvicorn)
24
  CMD ["python", "api/app.py"]
 
1
  FROM python:3.9-slim
 
 
2
  RUN useradd -m -u 1000 user
3
  WORKDIR /app
4
 
 
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
 
7
  RUN pip install gradio torch pillow requests
8
 
 
9
  COPY --chown=user:user . .
10
 
 
11
  RUN chown -R user:user /app
12
  USER user
 
 
13
  EXPOSE 7860
14
 
15
+ # run the file that actually exists
16
  CMD ["python", "api/app.py"]
app.py → api/app.py RENAMED
File without changes