meg-huggingface
commited on
Commit
•
864e7d1
1
Parent(s):
1868d69
Playing with data directory and app initialization
Browse files- Dockerfile +8 -8
- out/addition_train/test.txt +0 -1
Dockerfile
CHANGED
@@ -13,29 +13,29 @@ RUN chmod +x /train.sh
|
|
13 |
RUN chmod +x /upload_results.py
|
14 |
|
15 |
# Make the working directory for user.
|
16 |
-
RUN mkdir /
|
17 |
|
18 |
# Start installing stuff as root so it doesn't complain about install permissions.
|
19 |
#RUN pip install --no-cache-dir --upgrade pip
|
20 |
RUN pip install --no-cache-dir --upgrade -r /requirements.txt
|
21 |
# Clone into the working directory for the user.
|
22 |
-
RUN git clone https://github.com/lee-ny/teaching_arithmetic.git /
|
23 |
#&& cd teaching_arithmetic && pip install -e .
|
24 |
|
25 |
# Copy all files we have into the user's working directory.
|
26 |
-
COPY --chown=user . /
|
27 |
# Kept getting permission denied errors when running train.py, which tries to
|
28 |
# create the out directory. Just doing this to try to help that.
|
29 |
-
RUN mkdir /
|
30 |
-
RUN chmod -R 777 /
|
31 |
|
32 |
# Switch to the user profile.
|
33 |
# This will help make sure the permissions of the cloned git stuff
|
34 |
# don't require root privileges (I am guessing).
|
35 |
USER user
|
36 |
|
37 |
-
# Switch to the /
|
38 |
-
WORKDIR /
|
39 |
|
40 |
# Permissions. Permissions. Already did this. Doing it again anyway.
|
41 |
RUN chmod +x train.sh
|
@@ -43,7 +43,7 @@ RUN chmod +x upload_results.py
|
|
43 |
|
44 |
# Could also use CMD. Example:
|
45 |
# CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
46 |
-
ENTRYPOINT ["/train.sh"]
|
47 |
|
48 |
|
49 |
|
|
|
13 |
RUN chmod +x /upload_results.py
|
14 |
|
15 |
# Make the working directory for user.
|
16 |
+
RUN mkdir /data
|
17 |
|
18 |
# Start installing stuff as root so it doesn't complain about install permissions.
|
19 |
#RUN pip install --no-cache-dir --upgrade pip
|
20 |
RUN pip install --no-cache-dir --upgrade -r /requirements.txt
|
21 |
# Clone into the working directory for the user.
|
22 |
+
RUN git clone https://github.com/lee-ny/teaching_arithmetic.git /data/teaching_arithmetic
|
23 |
#&& cd teaching_arithmetic && pip install -e .
|
24 |
|
25 |
# Copy all files we have into the user's working directory.
|
26 |
+
COPY --chown=user . /data
|
27 |
# Kept getting permission denied errors when running train.py, which tries to
|
28 |
# create the out directory. Just doing this to try to help that.
|
29 |
+
RUN mkdir /data/teaching_arithmetic/out
|
30 |
+
RUN chmod -R 777 /data/
|
31 |
|
32 |
# Switch to the user profile.
|
33 |
# This will help make sure the permissions of the cloned git stuff
|
34 |
# don't require root privileges (I am guessing).
|
35 |
USER user
|
36 |
|
37 |
+
# Switch to the /data working directory.
|
38 |
+
WORKDIR /data
|
39 |
|
40 |
# Permissions. Permissions. Already did this. Doing it again anyway.
|
41 |
RUN chmod +x train.sh
|
|
|
43 |
|
44 |
# Could also use CMD. Example:
|
45 |
# CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
46 |
+
ENTRYPOINT ["/train.sh:app"]
|
47 |
|
48 |
|
49 |
|
out/addition_train/test.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
test
|
|
|
|