NotRev commited on
Commit
89a9d46
·
verified ·
1 Parent(s): b61c915

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -5
Dockerfile CHANGED
@@ -1,18 +1,19 @@
1
- # Use a common, stable Python image used for ML deployments
2
- FROM python:3.10
3
 
4
  WORKDIR /app
5
 
6
- # The necessary build tools are usually included, but we'll ensure common libraries are present
7
  RUN apt-get update && apt-get install -y \
8
  curl \
9
  git \
10
  libffi-dev \
 
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Copy and install dependencies
14
  COPY requirements.txt ./
15
- # We use --no-cache-dir to prevent disk space issues, and --force-reinstall to clear old broken installs
16
  RUN pip3 install --no-cache-dir --force-reinstall -r requirements.txt
17
 
18
  # Copy application source code
 
1
+ # Use the official PyTorch base image (CPU-only version)
2
+ FROM pytorch/pytorch:2.0.1-cpu
3
 
4
  WORKDIR /app
5
 
6
+ # Install necessary system packages for Streamlit and Git
7
  RUN apt-get update && apt-get install -y \
8
  curl \
9
  git \
10
  libffi-dev \
11
+ libssl-dev \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Copy and install ONLY non-torch dependencies (torch is already installed)
15
  COPY requirements.txt ./
16
+ # Install non-torch dependencies, ignoring any torch/cuda mentions
17
  RUN pip3 install --no-cache-dir --force-reinstall -r requirements.txt
18
 
19
  # Copy application source code