Update Dockerfile
Browse files- Dockerfile +9 -4
Dockerfile
CHANGED
@@ -10,18 +10,20 @@ RUN apt-get install -y git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1-mes
|
|
10 |
RUN git lfs install
|
11 |
|
12 |
# Ensure the cache directory is writable by the user
|
13 |
-
RUN chown -R user:user /home/user/app/cache
|
14 |
|
15 |
# Install additional packages from packages.txt
|
16 |
-
RUN --mount=target=/tmp/packages.txt,source=packages.txt apt-get update &&
|
|
|
17 |
|
18 |
# Install Python requirements
|
19 |
-
RUN --mount=target=/tmp/requirements.txt,source=requirements.txt
|
20 |
|
21 |
WORKDIR /home/user/app
|
22 |
|
23 |
# Install specific versions of pip and other packages
|
24 |
-
RUN pip install --no-cache-dir pip==22.3.1 &&
|
|
|
25 |
RUN pip freeze > /tmp/freeze.txt
|
26 |
|
27 |
# Install Gradio and other dependencies
|
@@ -47,5 +49,8 @@ USER user
|
|
47 |
# Copy the app file
|
48 |
COPY app.py .
|
49 |
|
|
|
|
|
|
|
50 |
# Run the app
|
51 |
CMD ["python3", "app.py"]
|
|
|
10 |
RUN git lfs install
|
11 |
|
12 |
# Ensure the cache directory is writable by the user
|
13 |
+
RUN chown -R user:user /home/user/app/cache && chmod -R 777 /home/user/app/cache
|
14 |
|
15 |
# Install additional packages from packages.txt
|
16 |
+
RUN --mount=target=/tmp/packages.txt,source=packages.txt apt-get update && \
|
17 |
+
xargs -r -a /tmp/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
|
18 |
|
19 |
# Install Python requirements
|
20 |
+
RUN --mount=target=/tmp/requirements.txt,source=requirements.txt pip install --no-cache-dir -r /tmp/requirements.txt
|
21 |
|
22 |
WORKDIR /home/user/app
|
23 |
|
24 |
# Install specific versions of pip and other packages
|
25 |
+
RUN pip install --no-cache-dir pip==22.3.1 && \
|
26 |
+
pip install --no-cache-dir datasets "huggingface-hub>=0.19" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1" "pydantic~=1.0"
|
27 |
RUN pip freeze > /tmp/freeze.txt
|
28 |
|
29 |
# Install Gradio and other dependencies
|
|
|
49 |
# Copy the app file
|
50 |
COPY app.py .
|
51 |
|
52 |
+
# Debug: Check permissions of cache directory
|
53 |
+
RUN ls -l /home/user/app && ls -l /home/user/app/cache
|
54 |
+
|
55 |
# Run the app
|
56 |
CMD ["python3", "app.py"]
|