Tanusree88 commited on
Commit
4ce99a1
·
verified ·
1 Parent(s): 185ac99

Update Docker

Browse files
Files changed (1) hide show
  1. Docker +41 -0
Docker CHANGED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official Python 3.10 image
2
+ FROM python:3.10
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies
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
+
18
+ # Copy requirements.txt to the working directory
19
+ COPY requirements.txt .
20
+
21
+ # Upgrade pip to avoid any compatibility issues
22
+ RUN pip install --upgrade pip
23
+ RUN pip install --upgrade transformers # Upgrade transformers here
24
+ # Check transformers version
25
+ RUN python -c "import transformers; print(transformers.__version__)"
26
+ RUN python test_import.py
27
+ RUN pip show transformers
28
+ RUN python -c "from transformers import SegformerForImageSegmentation"
29
+
30
+ # Install the required Python packages
31
+ RUN pip install -r requirements.txt
32
+ RUN pip install --upgrade transformers # Upgrade transformers here
33
+ # Check transformers version
34
+ RUN python -c "import transformers; print(transformers.__version__)"
35
+ RUN python test_import.py
36
+
37
+ # Copy the rest of the application code to the working directory
38
+ COPY . .
39
+ COPY test_import.py
40
+ # Command to run the app with Streamlit
41
+ CMD ["streamlit", "run", "app.py", "--server.port=8080", "--server.address=0.0.0.0"]