Update Dockerfile
Browse files- Dockerfile +41 -0
Dockerfile
CHANGED
|
@@ -29,3 +29,44 @@ RUN tar xvzf aim_repo.tar.gz
|
|
| 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"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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"]
|
| 32 |
+
|
| 33 |
+
FROM ubuntu:kinetic
|
| 34 |
+
|
| 35 |
+
# Doesn't usually have an "upgrade"
|
| 36 |
+
RUN apt-get update \
|
| 37 |
+
&& DEBIAN_FRONTEND=noninteractive \
|
| 38 |
+
apt-get install --no-install-recommends --assume-yes \
|
| 39 |
+
build-essential \
|
| 40 |
+
python3 \
|
| 41 |
+
python3-dev \
|
| 42 |
+
python3-pip
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
RUN useradd -m -u 1000 aim_user
|
| 46 |
+
|
| 47 |
+
# Switch to the "aim_user" user
|
| 48 |
+
USER aim_user
|
| 49 |
+
|
| 50 |
+
# Set home to the user's home directory
|
| 51 |
+
ENV HOME=/home/aim_user \
|
| 52 |
+
PATH=/home/aim_user/.local/bin:$PATH
|
| 53 |
+
|
| 54 |
+
# Set the working directory to the user's home directory
|
| 55 |
+
WORKDIR $HOME
|
| 56 |
+
|
| 57 |
+
# install the `aim` package on the latest version
|
| 58 |
+
RUN pip install aim
|
| 59 |
+
|
| 60 |
+
RUN aim telemetry off
|
| 61 |
+
|
| 62 |
+
ENTRYPOINT ["/bin/sh", "-c"]
|
| 63 |
+
|
| 64 |
+
COPY aim_repo.tar.gz .
|
| 65 |
+
RUN tar xvzf aim_repo.tar.gz
|
| 66 |
+
# have to run `aim init` in the directory that stores aim data for
|
| 67 |
+
# otherwise `aim up` will prompt for confirmation to create the directory itself.
|
| 68 |
+
# We run aim listening on 0.0.0.0 to expose all ports. Also, we run
|
| 69 |
+
# using `--dev` to print verbose logs. Port 43800 is the default port of
|
| 70 |
+
# `aim up` but explicit is better than implicit.
|
| 71 |
+
CMD ["aim up --host 0.0.0.0 --port 7860 --workers 2"]
|
| 72 |
+
|