Robert commited on
Commit
e7889cd
·
1 Parent(s): de706a2

Try to fix import error issue

Browse files
Files changed (3) hide show
  1. Dockerfile +17 -3
  2. app.py +1 -1
  3. s3.py → test_compress.py +0 -0
Dockerfile CHANGED
@@ -8,7 +8,14 @@ RUN pip install --upgrade pip setuptools wheel
8
  RUN pip install cmake
9
 
10
  # Install system build dependencies
11
- RUN apt-get clean && apt-get -y update && apt-get install -y build-essential cmake libopenblas-dev liblapack-dev libopenblas-dev liblapack-dev
 
 
 
 
 
 
 
12
 
13
  ENV CMAKE_BUILD_PARALLEL_LEVEL=4
14
 
@@ -26,7 +33,14 @@ FROM python:3.12-slim AS runner
26
  WORKDIR /app
27
 
28
  # Install runtime dependency: libopenblas.so.0 is provided by libopenblas-base.
29
- RUN apt-get update && apt-get install -y build-essential cmake libopenblas-dev liblapack-dev libopenblas-dev liblapack-dev
 
 
 
 
 
 
 
30
 
31
  ENV HF_HOME=/tmp/huggingface
32
  ENV HUGGINGFACE_HUB_CACHE=/tmp/huggingface
@@ -39,7 +53,7 @@ RUN mkdir -p /tmp/model /tmp/huggingface /tmp/.cache /tmp/.gradio /tmp/.gradio/c
39
 
40
  COPY --from=builder /app/venv venv
41
 
42
- COPY app.py models.py test_functions.py s3.py ./
43
  COPY examples/ /app/examples/
44
  COPY assets/ /app/assets/
45
 
 
8
  RUN pip install cmake
9
 
10
  # Install system build dependencies
11
+ RUN apt-get clean && apt-get -y update && \
12
+ apt-get install -y --no-install-recommends \
13
+ build-essential \
14
+ cmake \
15
+ libopenblas-dev \
16
+ liblapack-dev \
17
+ libx11-dev && \
18
+ rm -rf /var/lib/apt/lists/*
19
 
20
  ENV CMAKE_BUILD_PARALLEL_LEVEL=4
21
 
 
33
  WORKDIR /app
34
 
35
  # Install runtime dependency: libopenblas.so.0 is provided by libopenblas-base.
36
+ RUN apt-get update && \
37
+ apt-get install -y --no-install-recommends \
38
+ build-essential \
39
+ cmake \
40
+ libopenblas-dev \
41
+ liblapack-dev \
42
+ libx11-6 && \
43
+ rm -rf /var/lib/apt/lists/*
44
 
45
  ENV HF_HOME=/tmp/huggingface
46
  ENV HUGGINGFACE_HUB_CACHE=/tmp/huggingface
 
53
 
54
  COPY --from=builder /app/venv venv
55
 
56
+ COPY app.py models.py test_functions.py test_compress.py ./
57
  COPY examples/ /app/examples/
58
  COPY assets/ /app/assets/
59
 
app.py CHANGED
@@ -12,7 +12,7 @@ from dotenv import load_dotenv
12
 
13
  load_dotenv()
14
 
15
- from s3 import build_context, imagine
16
 
17
  # Model download & caching directory (created in Dockerfile)
18
  MODEL_DIR = "/tmp/model"
 
12
 
13
  load_dotenv()
14
 
15
+ from test_compress import build_context, imagine
16
 
17
  # Model download & caching directory (created in Dockerfile)
18
  MODEL_DIR = "/tmp/model"
s3.py → test_compress.py RENAMED
File without changes