Spaces:
Sleeping
Sleeping
add app
Browse files- dockerfile +4 -12
dockerfile
CHANGED
@@ -1,20 +1,12 @@
|
|
1 |
# Start with a builder image
|
2 |
-
FROM python:3.9
|
3 |
|
|
|
4 |
# Copy only requirements.txt initially to leverage Docker cache
|
5 |
-
COPY requirements.txt .
|
6 |
-
RUN python3 -m pip install --upgrade pip
|
7 |
-
RUN python3 -m pip install --no-cache-dir -r requirements.txt
|
8 |
|
|
|
9 |
|
10 |
-
# sentence transformers deps
|
11 |
-
# ----------------------
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
# Set working directory
|
16 |
-
WORKDIR /app
|
17 |
-
# Copy the rest of the application from the current directory to /app inside the container
|
18 |
COPY . .
|
19 |
|
20 |
RUN sudo apt-get install -y glpk-utils
|
|
|
1 |
# Start with a builder image
|
2 |
+
FROM python:3.9 as builder
|
3 |
|
4 |
+
WORKDIR /code
|
5 |
# Copy only requirements.txt initially to leverage Docker cache
|
6 |
+
COPY ./requirements.txt /code/requirements.txt
|
|
|
|
|
7 |
|
8 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
COPY . .
|
11 |
|
12 |
RUN sudo apt-get install -y glpk-utils
|