fffiloni commited on
Commit
deaf22d
·
verified ·
1 Parent(s): c49c14d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -2
Dockerfile CHANGED
@@ -19,6 +19,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
19
  python3.9 \
20
  python3-pip \
21
  python3.9-dev \
 
22
  && rm -rf /var/lib/apt/lists/*
23
 
24
  # Set Python 3.9 as the default python and pip versions
@@ -49,8 +50,9 @@ ENV HOME=/home/user \
49
  # Set working directory
50
  WORKDIR $HOME/app
51
 
52
- # Install PyTorch first
53
- RUN pip install --no-cache-dir torch==1.7.1 torchvision --extra-index-url https://download.pytorch.org/whl/cu113 && \
 
54
  python -c "import torch; print('PyTorch version:', torch.__version__)"
55
 
56
  # Clone the repository
 
19
  python3.9 \
20
  python3-pip \
21
  python3.9-dev \
22
+ python3.9-venv \
23
  && rm -rf /var/lib/apt/lists/*
24
 
25
  # Set Python 3.9 as the default python and pip versions
 
50
  # Set working directory
51
  WORKDIR $HOME/app
52
 
53
+ # Upgrade pip and install PyTorch first
54
+ RUN pip install --no-cache-dir --upgrade pip && \
55
+ pip install --no-cache-dir torch==1.7.1 torchvision --extra-index-url https://download.pytorch.org/whl/cu113 && \
56
  python -c "import torch; print('PyTorch version:', torch.__version__)"
57
 
58
  # Clone the repository