Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +13 -5
Dockerfile
CHANGED
|
@@ -10,13 +10,21 @@ RUN apt-get update \
|
|
| 10 |
python3-pip
|
| 11 |
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# install the `aim` package on the latest version
|
| 14 |
RUN pip install aim
|
| 15 |
|
| 16 |
-
# make a directory where the Aim repo will be initialized, `/aim`
|
| 17 |
-
RUN mkdir /aim
|
| 18 |
-
RUN touch /.aim_profile
|
| 19 |
-
RUN chown 1000:1000 /aim /.aim_profile
|
| 20 |
RUN aim telemetry off
|
| 21 |
|
| 22 |
ENTRYPOINT ["/bin/sh", "-c"]
|
|
@@ -28,4 +36,4 @@ RUN tar xvzf aim_repo.tar.gz
|
|
| 28 |
# We run aim listening on 0.0.0.0 to expose all ports. Also, we run
|
| 29 |
# using `--dev` to print verbose logs. Port 43800 is the default port of
|
| 30 |
# `aim up` but explicit is better than implicit.
|
| 31 |
-
CMD ["aim up --host 0.0.0.0 --port 7860 --workers 2"]
|
|
|
|
| 10 |
python3-pip
|
| 11 |
|
| 12 |
|
| 13 |
+
RUN useradd -m -u 1000 aim_user
|
| 14 |
+
|
| 15 |
+
# Switch to the "aim_user" user
|
| 16 |
+
USER aim_user
|
| 17 |
+
|
| 18 |
+
# Set home to the user's home directory
|
| 19 |
+
ENV HOME=/home/aim_user \
|
| 20 |
+
PATH=/home/aim_user/.local/bin:$PATH
|
| 21 |
+
|
| 22 |
+
# Set the working directory to the user's home directory
|
| 23 |
+
WORKDIR $HOME
|
| 24 |
+
|
| 25 |
# install the `aim` package on the latest version
|
| 26 |
RUN pip install aim
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
RUN aim telemetry off
|
| 29 |
|
| 30 |
ENTRYPOINT ["/bin/sh", "-c"]
|
|
|
|
| 36 |
# We run aim listening on 0.0.0.0 to expose all ports. Also, we run
|
| 37 |
# using `--dev` to print verbose logs. Port 43800 is the default port of
|
| 38 |
# `aim up` but explicit is better than implicit.
|
| 39 |
+
CMD ["aim up --host 0.0.0.0 --port 7860 --workers 2"]
|