Spaces:
Sleeping
Sleeping
Add application file
Browse files- 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
|
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
|
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
|
24 |
-
COPY --chown=user ./src /
|
25 |
-
COPY --chown=user ./config /
|
26 |
-
COPY --chown=user ./
|
27 |
-
COPY --chown=user ./
|
28 |
|
29 |
-
|
30 |
-
|
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
|