Spaces:
Runtime error
Runtime error
Commit
·
c7e2b56
1
Parent(s):
4a2d6e9
change docker
Browse files- Dockerfile +12 -10
Dockerfile
CHANGED
|
@@ -12,22 +12,18 @@ RUN apt-get update && apt-get install -y software-properties-common && \
|
|
| 12 |
|
| 13 |
# Install Python 3.11 and required packages
|
| 14 |
RUN apt-get install -y \
|
| 15 |
-
python3.11 python3.11-distutils python3.11-dev
|
| 16 |
rm -rf /var/lib/apt/lists/*
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
# Update alternatives to set Python 3.11 as default
|
| 19 |
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 && \
|
| 20 |
update-alternatives --config python3
|
| 21 |
|
| 22 |
-
# Upgrade pip to the latest version
|
| 23 |
-
RUN python3 -m pip install --upgrade pip
|
| 24 |
-
|
| 25 |
-
# Set the working directory
|
| 26 |
-
WORKDIR /app
|
| 27 |
-
|
| 28 |
-
# Copy the application files
|
| 29 |
-
COPY . .
|
| 30 |
-
|
| 31 |
# Set Hugging Face cache directory
|
| 32 |
ENV TRANSFORMERS_CACHE=/app/cache
|
| 33 |
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
|
|
@@ -36,6 +32,12 @@ RUN mkdir -p /app/cache && chmod -R 777 /app/cache
|
|
| 36 |
RUN mkdir -p /app/uploads/vectors && \
|
| 37 |
chmod -R 777 /app/uploads
|
| 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
# Install Python dependencies
|
| 40 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 41 |
|
|
|
|
| 12 |
|
| 13 |
# Install Python 3.11 and required packages
|
| 14 |
RUN apt-get install -y \
|
| 15 |
+
python3.11 python3.11-distutils python3.11-dev wget git unzip && \
|
| 16 |
rm -rf /var/lib/apt/lists/*
|
| 17 |
|
| 18 |
+
# Install pip using get-pip.py
|
| 19 |
+
RUN wget https://bootstrap.pypa.io/get-pip.py && \
|
| 20 |
+
python3.11 get-pip.py && \
|
| 21 |
+
rm get-pip.py
|
| 22 |
+
|
| 23 |
# Update alternatives to set Python 3.11 as default
|
| 24 |
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 && \
|
| 25 |
update-alternatives --config python3
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
# Set Hugging Face cache directory
|
| 28 |
ENV TRANSFORMERS_CACHE=/app/cache
|
| 29 |
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
|
|
|
|
| 32 |
RUN mkdir -p /app/uploads/vectors && \
|
| 33 |
chmod -R 777 /app/uploads
|
| 34 |
|
| 35 |
+
# Set the working directory
|
| 36 |
+
WORKDIR /app
|
| 37 |
+
|
| 38 |
+
# Copy the application files
|
| 39 |
+
COPY . .
|
| 40 |
+
|
| 41 |
# Install Python dependencies
|
| 42 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 43 |
|