timgremore commited on
Commit
cb2ad0a
1 Parent(s): 7f6d7d1

HF Space configuration

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -4
Dockerfile CHANGED
@@ -42,14 +42,22 @@ WORKDIR /app
42
  RUN mix local.hex --force && \
43
  mix local.rebar --force
44
 
 
 
 
 
45
  # set build ENV
46
  ENV MIX_ENV="prod"
47
 
48
  # bumblebee - XLA_TARGET must exist before deps pulled
49
  ENV XLA_TARGET="cuda120"
50
- ENV BUMBLEBEE_CACHE_DIR="/data/cache/bumblebee"
51
  ENV XLA_CACHE_DIR="/data/cache/xla"
52
 
 
 
 
 
53
  # install mix dependencies
54
  COPY mix.exs mix.lock ./
55
  RUN mix deps.get --only $MIX_ENV
@@ -127,14 +135,21 @@ ENV LC_ALL en_US.UTF-8
127
  WORKDIR "/app"
128
  RUN chown nobody /app
129
 
130
- # set runner ENV
 
 
 
131
  ENV MIX_ENV="prod"
132
 
133
- # Bumblebee
134
  ENV XLA_TARGET="cuda120"
135
- ENV BUMBLEBEE_CACHE_DIR="/data/cache/bumblebee"
136
  ENV XLA_CACHE_DIR="/data/cache/xla"
137
 
 
 
 
 
138
  # ENV CUDA_HOME="/usr/local/cuda"
139
  # ENV PATH="${CUDA_HOME}/bin:${PATH}"
140
  # ENV LD_LIBRARY_PATH="${CUDA_HOME}/lib64:$LD_LIBRARY_PATH"
 
42
  RUN mix local.hex --force && \
43
  mix local.rebar --force
44
 
45
+
46
+ # NOTE: Some config borrowed from this HF example:
47
+ # https://huggingface.co/spaces/SpacesExamples/single_file_phx_bumblebee_ml/blob/main/Dockerfile
48
+
49
  # set build ENV
50
  ENV MIX_ENV="prod"
51
 
52
  # bumblebee - XLA_TARGET must exist before deps pulled
53
  ENV XLA_TARGET="cuda120"
54
+ ENV BUMBLEBEE_CACHE_DIR="/app/.bumblebee"
55
  ENV XLA_CACHE_DIR="/data/cache/xla"
56
 
57
+ ENV MIX_HOME="/app/.mix"
58
+ ENV EXS_DRY_RUN="true"
59
+ ENV MIX_INSTALL_DIR="/app/.mix"
60
+
61
  # install mix dependencies
62
  COPY mix.exs mix.lock ./
63
  RUN mix deps.get --only $MIX_ENV
 
135
  WORKDIR "/app"
136
  RUN chown nobody /app
137
 
138
+ # NOTE: Some config borrowed from this HF example:
139
+ # https://huggingface.co/spaces/SpacesExamples/single_file_phx_bumblebee_ml/blob/main/Dockerfile
140
+
141
+ # set build ENV
142
  ENV MIX_ENV="prod"
143
 
144
+ # bumblebee - XLA_TARGET must exist before deps pulled
145
  ENV XLA_TARGET="cuda120"
146
+ ENV BUMBLEBEE_CACHE_DIR="/app/.bumblebee"
147
  ENV XLA_CACHE_DIR="/data/cache/xla"
148
 
149
+ ENV MIX_HOME="/app/.mix"
150
+ ENV EXS_DRY_RUN="true"
151
+ ENV MIX_INSTALL_DIR="/app/.mix"
152
+
153
  # ENV CUDA_HOME="/usr/local/cuda"
154
  # ENV PATH="${CUDA_HOME}/bin:${PATH}"
155
  # ENV LD_LIBRARY_PATH="${CUDA_HOME}/lib64:$LD_LIBRARY_PATH"