vian123 commited on
Commit
0024334
·
verified ·
1 Parent(s): d4a3209

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -10
Dockerfile CHANGED
@@ -1,33 +1,28 @@
1
- FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
7
  build-essential \
8
  curl \
9
- software-properties-common \
10
  git \
11
  ffmpeg \
12
  libsndfile1 \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
- # Copy requirements and source code
16
  COPY requirements.txt ./
17
  COPY src/ ./src/
18
 
19
- # Upgrade pip and install Python dependencies
20
  RUN pip install --upgrade pip && \
21
  pip install --no-cache-dir -r requirements.txt
22
 
23
- # Optional: Confirm transformers version (debugging)
24
- RUN python -c "import transformers; print('Transformers version:', transformers.__version__)"
25
 
26
- # Streamlit port
27
  EXPOSE 8501
28
 
29
- # Healthcheck for Streamlit
30
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
31
 
32
- # Run Streamlit app
33
  ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
+ FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
5
+ # Install dependencies
6
  RUN apt-get update && apt-get install -y \
7
  build-essential \
8
  curl \
 
9
  git \
10
  ffmpeg \
11
  libsndfile1 \
12
  && rm -rf /var/lib/apt/lists/*
13
 
 
14
  COPY requirements.txt ./
15
  COPY src/ ./src/
16
 
17
+ # Upgrade pip and install dependencies
18
  RUN pip install --upgrade pip && \
19
  pip install --no-cache-dir -r requirements.txt
20
 
21
+ # Confirm transformers and torch version
22
+ RUN python -c "import transformers; import torch; print('Transformers:', transformers.__version__, 'Torch:', torch.__version__)"
23
 
 
24
  EXPOSE 8501
25
 
 
26
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
27
 
 
28
  ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]