nsthorat commited on
Commit
86f715f
1 Parent(s): b965df2
Dockerfile CHANGED
@@ -4,23 +4,32 @@ FROM python:3.9-bullseye
4
  # Allow statements and log messages to immediately appear in the Knative logs
5
  ENV PYTHONUNBUFFERED True
6
 
 
 
 
 
 
7
  # Set the working directory in the container.
8
- WORKDIR /server
9
 
10
  # Install the dependencies. This requires exporting requirements.txt from poetry first, which
11
  # happens from ./build_docker.sh.
12
- COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
- COPY .env .
16
- COPY .env.demo .
17
  # Copy the README so we can read the datasets from the HuggingFace config.
18
- COPY README.md .
19
- COPY LICENSE .
20
 
21
  # Copy python files.
22
- COPY /lilac ./lilac/
23
 
24
- COPY docker_start.sh docker_start.py ./
 
 
 
 
25
 
26
  CMD ["bash", "docker_start.sh"]
 
4
  # Allow statements and log messages to immediately appear in the Knative logs
5
  ENV PYTHONUNBUFFERED True
6
 
7
+ # See: https://huggingface.co/docs/hub/spaces-sdks-docker#permissions
8
+ RUN useradd -m -u 1000 user
9
+ USER user
10
+ ENV HOME=/home/user \
11
+ PATH=/home/user/.local/bin:$PATH
12
  # Set the working directory in the container.
13
+ WORKDIR $HOME/app
14
 
15
  # Install the dependencies. This requires exporting requirements.txt from poetry first, which
16
  # happens from ./build_docker.sh.
17
+ COPY --chown=user requirements.txt .
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
+ COPY --chown=user .env .
21
+ COPY --chown=user .env.demo .
22
  # Copy the README so we can read the datasets from the HuggingFace config.
23
+ COPY --chown=user README.md .
24
+ COPY --chown=user LICENSE .
25
 
26
  # Copy python files.
27
+ COPY --chown=user /lilac ./lilac/
28
 
29
+ COPY --chown=user docker_start.sh docker_start.py ./
30
+
31
+ # Make a local data directory for non-persistent storage demos.
32
+ RUN mkdir -p ./data
33
+ RUN chown -R user ./data
34
 
35
  CMD ["bash", "docker_start.sh"]
data/.cache/lilac/concept/lilac/negative-sentiment/gte-small.pkl DELETED
Binary file (202 kB)
 
data/.cache/lilac/concept/lilac/non-english/gte-small.pkl DELETED
Binary file (331 kB)
 
data/.cache/lilac/concept/lilac/source-code/gte-small.pkl DELETED
Binary file (126 kB)