Nolwenn
commited on
Commit
·
37e134d
1
Parent(s):
d44011a
Update args name
Browse files- Dockerfile +9 -1
- download_external_data.py +4 -4
Dockerfile
CHANGED
@@ -1,7 +1,15 @@
|
|
1 |
# Dockerfile to run CRS Arena
|
2 |
FROM python:3.9-bullseye
|
3 |
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
# Install requirements
|
7 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
1 |
# Dockerfile to run CRS Arena
|
2 |
FROM python:3.9-bullseye
|
3 |
|
4 |
+
# Set up user
|
5 |
+
RUN useradd -m -u 1000 user
|
6 |
+
USER user
|
7 |
+
ENV HOME=/home/user \
|
8 |
+
PATH=/home/user/.local/bin:$PATH
|
9 |
+
|
10 |
+
WORKDIR $HOME/app
|
11 |
+
|
12 |
+
COPY --chown=user . $HOME/app
|
13 |
|
14 |
# Install requirements
|
15 |
RUN pip install --no-cache-dir -r requirements.txt
|
download_external_data.py
CHANGED
@@ -63,10 +63,10 @@ def parse_args() -> argparse.Namespace:
|
|
63 |
description="Download external data for the project."
|
64 |
)
|
65 |
parser.add_argument(
|
66 |
-
"models
|
67 |
)
|
68 |
parser.add_argument(
|
69 |
-
"
|
70 |
type=str,
|
71 |
help="URL to download the item embeddings folder",
|
72 |
)
|
@@ -80,8 +80,8 @@ if __name__ == "__main__":
|
|
80 |
|
81 |
if not os.path.exists("data/models"):
|
82 |
logging.info("Downloading models...")
|
83 |
-
download_and_extract_models(args.
|
84 |
|
85 |
if not os.path.exists("data/embed_items"):
|
86 |
logging.info("Downloading item embeddings...")
|
87 |
-
download_and_extract_item_embeddings(args.
|
|
|
63 |
description="Download external data for the project."
|
64 |
)
|
65 |
parser.add_argument(
|
66 |
+
"models", type=str, help="URL to download the models folder."
|
67 |
)
|
68 |
parser.add_argument(
|
69 |
+
"embeddings",
|
70 |
type=str,
|
71 |
help="URL to download the item embeddings folder",
|
72 |
)
|
|
|
80 |
|
81 |
if not os.path.exists("data/models"):
|
82 |
logging.info("Downloading models...")
|
83 |
+
download_and_extract_models(args.models)
|
84 |
|
85 |
if not os.path.exists("data/embed_items"):
|
86 |
logging.info("Downloading item embeddings...")
|
87 |
+
download_and_extract_item_embeddings(args.embeddings)
|