Faizbulbul commited on
Commit
d8cd495
·
verified ·
1 Parent(s): cd597bd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -35
Dockerfile CHANGED
@@ -1,40 +1,10 @@
1
- # Use official Python image
2
  FROM python:3.10
3
 
4
- # Set working directory
5
- WORKDIR /home/user/app
6
 
7
- # Install required system packages
8
- RUN apt-get update && apt-get install -y \
9
- git \
10
- git-lfs \
11
- ffmpeg \
12
- libsm6 \
13
- libxext6 \
14
- cmake \
15
- rsync \
16
- libgl1-mesa-glx && \
17
- rm -rf /var/lib/apt/lists/* && \
18
- git lfs install
19
 
20
- # Upgrade pip and install dependencies
21
- RUN pip install --no-cache-dir pip -U && \
22
- pip install --no-cache-dir \
23
- fastapi \
24
- torch \
25
- diffusers \
26
- transformers \
27
- gradio \
28
- uvicorn
29
 
30
- # Clear cache to prevent issues
31
- RUN rm -rf /root/.cache
32
-
33
- # Copy application files
34
- COPY app.py .
35
-
36
- # Expose port
37
- EXPOSE 7860
38
-
39
- # Run the application
40
- CMD ["python", "app.py"]
 
 
1
  FROM python:3.10
2
 
3
+ WORKDIR /app
 
4
 
5
+ COPY requirements.txt .
6
+ RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
 
 
 
 
 
7
 
8
+ COPY . .
 
 
 
 
 
 
 
 
9
 
10
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]