muskan19 commited on
Commit
bad7f37
·
verified ·
1 Parent(s): f3975e1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +0 -42
Dockerfile CHANGED
@@ -1,46 +1,4 @@
1
- # Should print 200
2
- '''
3
- # Use a full Python base image (better compatibility with TensorFlow and OpenCV)
4
- FROM python:3.9
5
- import requests
6
- print(requests.get("https://huggingface.co").status_code) # Should print 200
7
-
8
-
9
- # Set the working directory in the container
10
- WORKDIR /app
11
-
12
- # Install system dependencies
13
- RUN apt-get update && apt-get install -y \
14
- build-essential \
15
- curl \
16
- git \
17
- libgl1-mesa-glx \
18
- && rm -rf /var/lib/apt/lists/*
19
-
20
- # Copy all project files into the container
21
- COPY . .
22
-
23
- # Create .streamlit config directory and disable usage stats (prevent permission issues)
24
- RUN mkdir -p /app/.streamlit && \
25
- echo "\
26
- [server]\n\
27
- headless = true\n\
28
- enableCORS = false\n\
29
- port = 8501\n\
30
- \n\
31
- [browser]\n\
32
- gatherUsageStats = false\n\
33
- " > /app/.streamlit/config.toml
34
-
35
- # Install Python dependencies
36
- RUN pip install --no-cache-dir -r requirements.txt
37
 
38
- # Expose Streamlit port
39
- EXPOSE 8501
40
-
41
- # Start the Streamlit app
42
- ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
43
- '''
44
 
45
  # Use a full Python base image for compatibility
46
  FROM python:3.9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
 
 
 
 
 
 
2
 
3
  # Use a full Python base image for compatibility
4
  FROM python:3.9