File size: 987 Bytes
60bb0aa
 
 
 
 
 
 
cacc3dd
 
 
 
60bb0aa
 
 
 
 
 
 
 
 
 
 
 
 
cacc3dd
60bb0aa
 
 
 
cacc3dd
001dfad
cacc3dd
60bb0aa
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
# Use the specified Python image as a base
FROM python:3.10.13-slim-bullseye

# Install Node.js
RUN apt-get update && apt-get install -y curl && \
    curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
    apt-get install -y nodejs

# Set the working directory in the Docker image
WORKDIR /app

# Copy the entire web directory into the Docker image
COPY ./web /app/web

# Build the web application
WORKDIR /app/web
RUN npm install && npm run build

# Return to the base directory
WORKDIR /app

# Copy the rest of the necessary files into the Docker image
COPY ./free_one_api /app/free_one_api
COPY ./requirements.txt ./main.py /app/

# Install the Python dependencies and remove unnecessary packages
RUN pip install --no-cache -r requirements.txt \
    && pip uninstall torch tensorflow transformers triton -y \
    && rm -rf /usr/local/lib/python3.10/site-packages/nvidia*

EXPOSE 7860
# Specify the command to run when the Docker container starts
CMD [ "python", "main.py" ]