Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +19 -1
Dockerfile
CHANGED
@@ -9,7 +9,25 @@ COPY ./requirements.txt /code/requirements.txt
|
|
9 |
|
10 |
# Install requirements.txt
|
11 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
# Set up a new user named "user" with user ID 1000
|
14 |
RUN useradd -m -u 1000 user
|
15 |
# Switch to the "user" user
|
|
|
9 |
|
10 |
# Install requirements.txt
|
11 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
12 |
+
import zipfile
|
13 |
+
import os
|
14 |
+
|
15 |
+
# Specify the path to your ZIP file
|
16 |
+
zip_file_path = 'odoo_vector_store.zip'
|
17 |
+
|
18 |
+
# Specify the directory where files will be extracted
|
19 |
+
extract_to_path = './'
|
20 |
+
|
21 |
+
# Create the directory if it doesn't exist
|
22 |
+
os.makedirs(extract_to_path, exist_ok=True)
|
23 |
+
|
24 |
+
# Open the zip file in read mode
|
25 |
+
with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
|
26 |
+
# Extract all the contents into the directory
|
27 |
+
zip_ref.extractall(extract_to_path)
|
28 |
+
|
29 |
+
print("Files extracted successfully!")
|
30 |
+
!rm -r odoo_vector_store.zip
|
31 |
# Set up a new user named "user" with user ID 1000
|
32 |
RUN useradd -m -u 1000 user
|
33 |
# Switch to the "user" user
|