nsthorat commited on
Commit
29c64ea
1 Parent(s): f30bebd
Files changed (1) hide show
  1. Dockerfile +5 -2
Dockerfile CHANGED
@@ -4,16 +4,19 @@ FROM python:3.9-bullseye
4
  # Allow statements and log messages to immediately appear in the Knative logs
5
  ENV PYTHONUNBUFFERED True
6
 
7
-
8
  # Set the working directory in the container.
9
- WORKDIR /code
10
 
11
  # Install the dependencies. This requires exporting requirements.txt from poetry first, which
12
  # happens from ./build_docker.sh.
13
  COPY requirements.txt .
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
 
 
 
16
  COPY /data /data
 
17
 
18
  COPY .env .
19
  COPY LICENSE .
 
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 the data to /data, the HF persistent storage. We do this after pip install to avoid
16
+ # re-installing dependencies if the data changes.
17
+ WORKDIR /
18
  COPY /data /data
19
+ WORKDIR /server
20
 
21
  COPY .env .
22
  COPY LICENSE .