JulianPhillips commited on
Commit
2a46da5
·
verified ·
1 Parent(s): cefb504

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
- # Base image with PyTorch and CUDA for GPU support
2
- FROM pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime
3
 
4
  # Install system dependencies
5
  RUN apt-get update && apt-get install -y \
@@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y \
7
  wget \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
- # Install Python packages including Hugging Face Transformers, TorchScript, Flask, and TensorFlow
11
  RUN pip install --no-cache-dir \
12
  torch \
13
  torchvision \
@@ -16,7 +16,8 @@ RUN pip install --no-cache-dir \
16
  Flask \
17
  Pillow \
18
  huggingface_hub \
19
- tensorflow
 
20
 
21
  # Set Hugging Face cache to a guaranteed writable directory
22
  ENV TRANSFORMERS_CACHE=/tmp/cache
 
1
+ # Base image with a lightweight version suitable for Hugging Face Spaces
2
+ FROM python:3.8-slim
3
 
4
  # Install system dependencies
5
  RUN apt-get update && apt-get install -y \
 
7
  wget \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
+ # Install Python packages including Hugging Face Transformers, TorchScript, Flask, TensorFlow, and TensorFlow Hub
11
  RUN pip install --no-cache-dir \
12
  torch \
13
  torchvision \
 
16
  Flask \
17
  Pillow \
18
  huggingface_hub \
19
+ tensorflow \
20
+ tensorflow_hub
21
 
22
  # Set Hugging Face cache to a guaranteed writable directory
23
  ENV TRANSFORMERS_CACHE=/tmp/cache