chore: update optimum-neuron version to 0.4.1

#1
by tengomucho HF Staff - opened
Files changed (1) hide show
  1. Dockerfile +6 -3
Dockerfile CHANGED
@@ -43,13 +43,16 @@ RUN apt-get update && apt-get install -y \
43
 
44
  ENV PATH =/opt/aws/neuron/bin:$PATH
45
 
46
- ARG OPTIMUM_NEURON_VERSION=0.4.0
 
 
 
47
  RUN pip install --extra-index-url https://pip.repos.neuron.amazonaws.com --no-cache-dir optimum-neuron[neuronx]==$OPTIMUM_NEURON_VERSION
48
  # End Neuron setup
49
  RUN pip install --no-cache-dir pip -U && \
50
  pip install --no-cache-dir \
51
  datasets \
52
- "huggingface-hub>=0.19" "hf_xet>=1.0.0,<2.0.0" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1" "pydantic~=1.0"
53
  RUN \
54
  apt-get update && \
55
  apt-get install -y curl && \
@@ -76,7 +79,7 @@ COPY --link --chown=1000 ./ /home/user/app
76
  COPY --from=pipfreeze --link --chown=1000 /tmp/freeze.txt /tmp/freeze.txt
77
  ENV PYTHONPATH=$HOME/app \
78
  PYTHONUNBUFFERED=1 \
79
- HF_HUB_ENABLE_HF_TRANSFER=1 \
80
  GRADIO_ALLOW_FLAGGING=never \
81
  GRADIO_FLAGGING_MODE=never \
82
  GRADIO_CACHE_EXAMPLES=true \
 
43
 
44
  ENV PATH =/opt/aws/neuron/bin:$PATH
45
 
46
+ # Install cpu pytorch to avoid having to install cuda deps: it makes image leaner and builds faster
47
+ RUN pip install torch==2.8.0 torchvision~=0.23 --index-url https://download.pytorch.org/whl/cpu
48
+ # Install optimum-neuron
49
+ ARG OPTIMUM_NEURON_VERSION=0.4.1
50
  RUN pip install --extra-index-url https://pip.repos.neuron.amazonaws.com --no-cache-dir optimum-neuron[neuronx]==$OPTIMUM_NEURON_VERSION
51
  # End Neuron setup
52
  RUN pip install --no-cache-dir pip -U && \
53
  pip install --no-cache-dir \
54
  datasets \
55
+ "huggingface-hub>=0.31.4" "protobuf<4" "click<8.1" "pydantic~=1.0"
56
  RUN \
57
  apt-get update && \
58
  apt-get install -y curl && \
 
79
  COPY --from=pipfreeze --link --chown=1000 /tmp/freeze.txt /tmp/freeze.txt
80
  ENV PYTHONPATH=$HOME/app \
81
  PYTHONUNBUFFERED=1 \
82
+ HF_XET_HIGH_PERFORMANCE=1 \
83
  GRADIO_ALLOW_FLAGGING=never \
84
  GRADIO_FLAGGING_MODE=never \
85
  GRADIO_CACHE_EXAMPLES=true \