Shankarm08 commited on
Commit
fe2a623
·
verified ·
1 Parent(s): b923dd0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -8
Dockerfile CHANGED
@@ -1,7 +1,8 @@
1
  # Use the official Python 3.10 image as the base
 
2
  FROM python:3.10
3
 
4
- # Install system dependencies required for Hugging Face models and image processing
5
  RUN apt-get update && apt-get install -y \
6
  git \
7
  git-lfs \
@@ -13,21 +14,23 @@ RUN apt-get update && apt-get install -y \
13
  libgl1-mesa-glx \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
- # Set up Git LFS for model downloads
17
  RUN git lfs install
18
 
19
- # Set the working directory
20
  WORKDIR /home/user/app
21
 
22
- # Copy the requirements file and install Python dependencies
23
- COPY requirements.txt /home/user/app/
24
- RUN pip install --no-cache-dir --upgrade pip && \
25
- pip install --no-cache-dir -r requirements.txt
 
 
26
 
27
  # Copy application code into the container
28
  COPY . .
29
 
30
- # Expose Streamlit's default port (8501) if you're using Streamlit
31
  EXPOSE 8501
32
 
33
  # Command to run the app
 
1
  # Use the official Python 3.10 image as the base
2
+ # Use the official Python 3.10 image as the base
3
  FROM python:3.10
4
 
5
+ # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
7
  git \
8
  git-lfs \
 
14
  libgl1-mesa-glx \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
+ # Set up Git LFS
18
  RUN git lfs install
19
 
20
+ # Set working directory
21
  WORKDIR /home/user/app
22
 
23
+ # Copy requirements file and install dependencies
24
+ COPY requirements.txt /tmp/requirements.txt
25
+
26
+ # Upgrade pip, setuptools, and wheel
27
+ RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
28
+ pip install --no-cache-dir -r /tmp/requirements.txt
29
 
30
  # Copy application code into the container
31
  COPY . .
32
 
33
+ # Expose Streamlit's default port
34
  EXPOSE 8501
35
 
36
  # Command to run the app