Spaces:
Sleeping
Sleeping
WebashalarForML
commited on
Commit
•
b2bcd2f
1
Parent(s):
be85188
Update Dockerfile
Browse files- Dockerfile +18 -2
Dockerfile
CHANGED
@@ -5,21 +5,37 @@ FROM python:3.9-slim
|
|
5 |
ENV PYTHONDONTWRITEBYTECODE 1
|
6 |
ENV PYTHONUNBUFFERED 1
|
7 |
|
|
|
|
|
|
|
|
|
|
|
8 |
# Set the working directory
|
9 |
WORKDIR /app
|
10 |
|
11 |
# Install system dependencies, including libgomp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
RUN apt-get update && apt-get install -y \
|
|
|
|
|
|
|
13 |
libgl1-mesa-glx \
|
14 |
libgomp1 \
|
15 |
libglib2.0-0 \
|
16 |
-
|
|
|
17 |
|
18 |
# Copy the requirements file into the container at /app
|
19 |
COPY requirements.txt /app/
|
20 |
|
21 |
# Install any needed packages specified in requirements.txt
|
22 |
-
RUN
|
23 |
|
24 |
# Create directories for session storage and uploads
|
25 |
RUN mkdir -p /app/flask_sessions /app/uploads && chmod -R 777 /app/flask_sessions /app/uploads
|
|
|
5 |
ENV PYTHONDONTWRITEBYTECODE 1
|
6 |
ENV PYTHONUNBUFFERED 1
|
7 |
|
8 |
+
# Set environment variables
|
9 |
+
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
|
10 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
11 |
+
ENV HF_HOME="/home/user/.cache/huggingface" # Set Hugging Face cache dire
|
12 |
+
|
13 |
# Set the working directory
|
14 |
WORKDIR /app
|
15 |
|
16 |
# Install system dependencies, including libgomp
|
17 |
+
#RUN apt-get update && apt-get install -y \
|
18 |
+
# libgl1-mesa-glx \
|
19 |
+
# libgomp1 \
|
20 |
+
# libglib2.0-0 \
|
21 |
+
# && rm -rf /var/lib/apt/lists/*
|
22 |
+
|
23 |
+
# Install Python, pip, and other dependencies
|
24 |
RUN apt-get update && apt-get install -y \
|
25 |
+
python3 \
|
26 |
+
python3-pip \
|
27 |
+
python3-dev \
|
28 |
libgl1-mesa-glx \
|
29 |
libgomp1 \
|
30 |
libglib2.0-0 \
|
31 |
+
libgthread-2.0-0 \
|
32 |
+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
33 |
|
34 |
# Copy the requirements file into the container at /app
|
35 |
COPY requirements.txt /app/
|
36 |
|
37 |
# Install any needed packages specified in requirements.txt
|
38 |
+
RUN pip3 install --no-cache-dir --upgrade -r requirements.txt
|
39 |
|
40 |
# Create directories for session storage and uploads
|
41 |
RUN mkdir -p /app/flask_sessions /app/uploads && chmod -R 777 /app/flask_sessions /app/uploads
|