guydffdsdsfd commited on
Commit
4e52673
·
verified ·
1 Parent(s): 4122bd0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -7
Dockerfile CHANGED
@@ -1,20 +1,18 @@
1
  FROM python:3.10-slim
2
 
3
- # Install System Dependencies
4
  RUN apt-get update && apt-get install -y libgl1 libglib2.0-0 curl && \
5
  rm -rf /var/lib/apt/lists/*
6
 
7
- # Install Python AI Libraries
8
  RUN pip install --no-cache-dir flask flask-cors requests diffusers transformers accelerate torch
9
 
10
  WORKDIR /app
11
 
12
- # Copy your files from the repository into the container
13
- COPY app.py .
14
- COPY index.html .
15
 
16
- # Expose the HF port
17
  EXPOSE 7860
18
 
19
- # Run the app
20
  CMD ["python", "app.py"]
 
1
  FROM python:3.10-slim
2
 
3
+ # 1. Install System Dependencies
4
  RUN apt-get update && apt-get install -y libgl1 libglib2.0-0 curl && \
5
  rm -rf /var/lib/apt/lists/*
6
 
7
+ # 2. Install Python AI Libraries
8
  RUN pip install --no-cache-dir flask flask-cors requests diffusers transformers accelerate torch
9
 
10
  WORKDIR /app
11
 
12
+ # 3. Only copy the backend script
13
+ COPY app.py /app/app.py
 
14
 
 
15
  EXPOSE 7860
16
 
17
+ # 4. Run the app
18
  CMD ["python", "app.py"]