Spaces:
Sleeping
Sleeping
[Project] Fix docker
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
@@ -85,18 +85,18 @@ WORKDIR /
|
|
85 |
### ------
|
86 |
### Copy from Repo
|
87 |
### ------
|
88 |
-
|
89 |
RUN --mount=type=secret,id=TAG,mode=0444,required=true \
|
90 |
--mount=type=secret,id=URL,mode=0444,required=true \
|
91 |
git clone --branch $(cat /run/secrets/TAG) $(cat /run/secrets/URL) /api
|
92 |
|
|
|
93 |
### ------
|
94 |
### Create DIRs
|
95 |
### ------
|
96 |
|
97 |
# Create the custom Poetry configuration directory and set permissions
|
98 |
-
RUN mkdir -p
|
99 |
-
mkdir -p $POETRY_CONFIG_DIR && \
|
100 |
# Create the NTLK folder
|
101 |
mkdir -p $NLTK_DATA && \
|
102 |
# Create the folder store files
|
@@ -111,7 +111,7 @@ chmod -R 777 $DATA_DIR
|
|
111 |
### ------
|
112 |
|
113 |
WORKDIR /api
|
114 |
-
RUN poetry install --
|
115 |
|
116 |
### ------
|
117 |
### Command to run
|
|
|
85 |
### ------
|
86 |
### Copy from Repo
|
87 |
### ------
|
88 |
+
RUN mkdir -p /api
|
89 |
RUN --mount=type=secret,id=TAG,mode=0444,required=true \
|
90 |
--mount=type=secret,id=URL,mode=0444,required=true \
|
91 |
git clone --branch $(cat /run/secrets/TAG) $(cat /run/secrets/URL) /api
|
92 |
|
93 |
+
|
94 |
### ------
|
95 |
### Create DIRs
|
96 |
### ------
|
97 |
|
98 |
# Create the custom Poetry configuration directory and set permissions
|
99 |
+
RUN mkdir -p $POETRY_CONFIG_DIR && \
|
|
|
100 |
# Create the NTLK folder
|
101 |
mkdir -p $NLTK_DATA && \
|
102 |
# Create the folder store files
|
|
|
111 |
### ------
|
112 |
|
113 |
WORKDIR /api
|
114 |
+
RUN poetry install --no-root && rm -rf $POETRY_CACHE_DIR
|
115 |
|
116 |
### ------
|
117 |
### Command to run
|