Bodyless commited on
Commit
a652368
·
verified ·
1 Parent(s): 168a415

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -9
Dockerfile CHANGED
@@ -1,29 +1,28 @@
1
- # 1. Use a base image with PyTorch and CUDA pre-installed.
2
- # This eliminates the long 'pip install torch' and compilation time.
3
  FROM nvcr.io/nvidia/pytorch:23.09-py3
4
 
5
- # Set working directory inside the container
6
  WORKDIR /app
7
 
8
- # Install system dependencies (like curl and git)
9
  RUN apt-get update && apt-get install -y \
10
  curl \
11
  git \
 
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
- # Copy requirements file and install remaining packages
15
  COPY requirements.txt ./
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
- # CRITICAL FIX: Download the spaCy language model
19
  RUN python3 -m spacy download en_core_web_sm
20
 
21
- # Copy source code to the container
22
  COPY src/ ./src/
23
 
24
- # Expose the port Streamlit runs on
25
  EXPOSE 8501
26
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
27
 
28
- # Command to run the Streamlit application
29
  ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
+
 
2
  FROM nvcr.io/nvidia/pytorch:23.09-py3
3
 
4
+
5
  WORKDIR /app
6
 
7
+
8
  RUN apt-get update && apt-get install -y \
9
  curl \
10
  git \
11
+ build-essential \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+
15
  COPY requirements.txt ./
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
+
19
  RUN python3 -m spacy download en_core_web_sm
20
 
21
+
22
  COPY src/ ./src/
23
 
24
+
25
  EXPOSE 8501
26
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
27
 
 
28
  ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]