Spaces:
Running
Running
Commit
·
2cfc1c6
1
Parent(s):
0395b94
Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +9 -2
Dockerfile
CHANGED
@@ -8,15 +8,22 @@ ENV PYTHONUNBUFFERED True
|
|
8 |
RUN useradd -m -u 1000 user
|
9 |
USER user
|
10 |
ENV HOME=/home/user \
|
11 |
-
|
12 |
|
13 |
# Set the working directory in the container.
|
14 |
WORKDIR $HOME/app
|
15 |
|
16 |
# Install the dependencies. This will look in ./dist for any wheels that match lilac. If they are
|
17 |
# not found, it will use the public pip package.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
COPY --chown=user /dist ./dist/
|
19 |
-
RUN python -m pip install --find-links=dist lilac[all]
|
20 |
|
21 |
COPY --chown=user .env .
|
22 |
COPY --chown=user .env.demo .
|
|
|
8 |
RUN useradd -m -u 1000 user
|
9 |
USER user
|
10 |
ENV HOME=/home/user \
|
11 |
+
PATH=/home/user/.local/bin:$PATH
|
12 |
|
13 |
# Set the working directory in the container.
|
14 |
WORKDIR $HOME/app
|
15 |
|
16 |
# Install the dependencies. This will look in ./dist for any wheels that match lilac. If they are
|
17 |
# not found, it will use the public pip package.
|
18 |
+
|
19 |
+
# Pip install lilac[all] and dependencies before trying to install the local image. This allows us
|
20 |
+
# to get cache hits on dependency installations when using a local wheel. When using the public pip
|
21 |
+
# package, the second call will be a no-op.
|
22 |
+
RUN python -m pip install lilac[all]
|
23 |
+
|
24 |
+
# Install from the local wheel inside ./dist. This will be a no-op if the wheel is not found.
|
25 |
COPY --chown=user /dist ./dist/
|
26 |
+
RUN python -m pip install --find-links=dist --upgrade lilac[all]
|
27 |
|
28 |
COPY --chown=user .env .
|
29 |
COPY --chown=user .env.demo .
|