Kiran5 commited on
Commit
cfc3128
·
1 Parent(s): 5e596ad

Add application file

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -11
Dockerfile CHANGED
@@ -5,30 +5,29 @@ RUN useradd -m -u 1000 user
5
  USER user
6
  ENV PATH="/home/user/.local/bin:$PATH"
7
 
8
- # Set the working directory to /app
9
- WORKDIR /app
10
 
11
  # Copy the requirements.txt file
12
  COPY --chown=user ./requirement.txt requirement.txt
13
 
14
  # Copy the necessary libraries (if required)
15
  COPY --chown=user ./lib/aicloudlibs-0.1.0-py3-none-any.whl /lib/
16
- # You can add the rest of your .whl files as needed
17
  # COPY --chown=user ./lib/better_profanity-2.0.0-py3-none-any.whl /lib/
18
  # COPY --chown=user ./lib/privacy-1.0.9-py3-none-any.whl /lib/
19
 
20
  # Install dependencies
21
  RUN pip install --no-cache-dir --upgrade -r requirement.txt
22
 
23
- # Copy the src folder into /app/src in the container
24
- COPY --chown=user ./src /app/src
25
- COPY --chown=user ./config /app/config
26
- COPY --chown=user ./lib /app/lib
27
- COPY --chown=user ./models /app/models
28
 
29
-
30
- # Set PYTHONPATH to include /app/src so Python can find llm_explain
31
- ENV PYTHONPATH="/app/src:$PYTHONPATH"
32
 
33
  # Expose the port (default for Hugging Face is 7860)
34
  EXPOSE 7860
 
5
  USER user
6
  ENV PATH="/home/user/.local/bin:$PATH"
7
 
8
+ # Set the working directory to root (default is root, no need to set it explicitly)
9
+ WORKDIR /
10
 
11
  # Copy the requirements.txt file
12
  COPY --chown=user ./requirement.txt requirement.txt
13
 
14
  # Copy the necessary libraries (if required)
15
  COPY --chown=user ./lib/aicloudlibs-0.1.0-py3-none-any.whl /lib/
16
+ # You can add other .whl files similarly if needed
17
  # COPY --chown=user ./lib/better_profanity-2.0.0-py3-none-any.whl /lib/
18
  # COPY --chown=user ./lib/privacy-1.0.9-py3-none-any.whl /lib/
19
 
20
  # Install dependencies
21
  RUN pip install --no-cache-dir --upgrade -r requirement.txt
22
 
23
+ # Copy the src folder directly into the root directory
24
+ COPY --chown=user ./src /src
25
+ COPY --chown=user ./config /config
26
+ COPY --chown=user ./models /models
27
+ COPY --chown=user ./lib /lib
28
 
29
+ # Set PYTHONPATH to include /src so Python can find llm_explain
30
+ ENV PYTHONPATH="/src:$PYTHONPATH"
 
31
 
32
  # Expose the port (default for Hugging Face is 7860)
33
  EXPOSE 7860