hannabaker commited on
Commit
db69386
·
verified ·
1 Parent(s): acb8374

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -14
Dockerfile CHANGED
@@ -5,39 +5,36 @@ FROM python:3.9-slim
5
  WORKDIR /app
6
 
7
  # 1. INSTALL SYSTEM DEPENDENCIES (as root)
8
- # Added autoconf, automake, libtool to generate the 'configure' script
9
  RUN apt-get update && apt-get install -y \
10
  build-essential \
11
  libglib2.0-dev \
12
  libssl-dev \
13
  libcurl4-openssl-dev \
14
- libgirepository1.0-dev \
 
15
  git \
16
- autoconf \
17
- automake \
18
- libtool \
19
  --no-install-recommends && \
20
  rm -rf /var/lib/apt/lists/*
21
 
22
- # 2. CLONE AND BUILD MEGATOOLS
23
- # Added './autogen.sh' to create the './configure' script before running it
24
  RUN git clone https://xff.cz/git/megatools && \
25
  cd megatools && \
26
- ./autogen.sh && \
27
- ./configure && \
28
- make && \
29
- make install && \
30
  cd .. && rm -rf megatools
31
 
32
- # 3. CREATE THE HUGGING FACE USER
33
  RUN useradd -m -u 1000 user
34
 
35
- # 4. SET UP PYTHON ENVIRONMENT
36
  COPY requirements.txt .
37
  RUN pip install --no-cache-dir -r requirements.txt
38
 
39
- # 5. COPY APPLICATION CODE AND SET PERMISSIONS
40
  COPY . .
 
 
41
  RUN chown -R 1000:1000 /app
42
 
43
  # 6. SWITCH TO THE NON-ROOT USER
 
5
  WORKDIR /app
6
 
7
  # 1. INSTALL SYSTEM DEPENDENCIES (as root)
 
8
  RUN apt-get update && apt-get install -y \
9
  build-essential \
10
  libglib2.0-dev \
11
  libssl-dev \
12
  libcurl4-openssl-dev \
13
+ meson \
14
+ ninja-build \
15
  git \
 
 
 
16
  --no-install-recommends && \
17
  rm -rf /var/lib/apt/lists/*
18
 
19
+ # Clone and build megatools using meson
 
20
  RUN git clone https://xff.cz/git/megatools && \
21
  cd megatools && \
22
+ meson setup build && \
23
+ ninja -C build && \
24
+ ninja -C build install && \
 
25
  cd .. && rm -rf megatools
26
 
27
+ # 2. CREATE THE HUGGING FACE USER
28
  RUN useradd -m -u 1000 user
29
 
30
+ # 3. SET UP PYTHON ENVIRONMENT
31
  COPY requirements.txt .
32
  RUN pip install --no-cache-dir -r requirements.txt
33
 
34
+ # 4. COPY APPLICATION CODE
35
  COPY . .
36
+
37
+ # 5. SET PERMISSIONS
38
  RUN chown -R 1000:1000 /app
39
 
40
  # 6. SWITCH TO THE NON-ROOT USER