File size: 1,911 Bytes
c81b24c
aff20b4
1c387c0
c81b24c
 
 
 
1c387c0
9fd7623
 
06bb0b4
b034602
 
 
80f3d8b
 
 
296f974
80f3d8b
 
1a90d45
296f974
 
 
 
6f488e4
296f974
 
 
 
 
 
 
 
 
 
6f488e4
5e945e0
 
 
 
1c387c0
296f974
c81b24c
9fd7623
2c7c419
9fd7623
 
1c387c0
9fd7623
 
 
1c387c0
9fd7623
 
 
 
 
1c387c0
9fd7623
 
 
1c387c0
9fd7623
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Use an appropriate base image with Ubuntu
FROM nvidia/cuda:11.2.2-base-ubuntu20.04

# Set environment variables for CUDA
ENV CUDA_HOME=/usr/local/cuda
ENV PATH=$CUDA_HOME/bin:$PATH
ENV LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH

# # Set DEBIAN_FRONTEND to noninteractive to prevent interactive prompts
# ENV DEBIAN_FRONTEND=noninteractive

# # Install NVIDIA driver
# RUN apt-get update && apt-get install -y --no-install-recommends nvidia-driver-460

RUN apt-get -y update \
    && apt-get install -y software-properties-common

# Adding PPA for Python 3.10
RUN apt-get -y update \
    && add-apt-repository ppa:deadsnakes/ppa

# Install Python 3.10
# RUN apt-get -y update \
#     && apt-get -y install python3.10 \
#     && apt-get -y install python3-pip


RUN apt-get update && apt-get install -y python3.10
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2
RUN update-alternatives --config python3

RUN python3 --version

# RUN apt-get -y update \
#     && apt-get -y install git

# # Additional system dependencies
# RUN apt-get -y update \
#     && apt-get install -y ffmpeg \
#     && apt-get install -y yt-dlp



# # FROM python:3.10

# # Switch back to the root user to install Python packages
# USER root

# # Copy your requirements.txt and install Python packages
# COPY ./requirements.txt /code/requirements.txt
# RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt

# # Create a non-root user and set environment variables
# RUN useradd -m -u 1000 user
# USER user
# ENV HOME=/home/user \
#     PATH=/home/user/.local/bin:$PATH

# # Set the working directory and copy your application files
# WORKDIR $HOME/app
# COPY --chown=user . $HOME/app

# # Specify the command to run your application
# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]