File size: 871 Bytes
90a49ef
0427506
90a49ef
 
0427506
90a49ef
0427506
 
 
 
 
 
 
 
90a49ef
 
 
 
0427506
90a49ef
 
 
0427506
 
 
 
 
6221970
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
# Use an official Python runtime as a parent image
FROM python:3.10-slim

# Set the working directory in the container
WORKDIR /home/user/app

# Copy the current directory contents into the container at /home/user/app
COPY . /home/user/app

# Install necessary system dependencies
RUN apt-get update && apt-get install -y \
    build-essential \
    libgl1-mesa-glx \
    && rm -rf /var/lib/apt/lists/*

# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Set the environment variable for Hugging Face access token
ARG ACC_TOKEN
ENV AccToken=${ACC_TOKEN}

# Expose the port the app runs on
EXPOSE 7860

# Define the command to run the application
CMD ["python", "app.py"]
RUN -p 7860:7860 --env ACC_TOKEN=your_huggingface_token --cpus="32" --memory="200g" --gpus '"device=0,1,2,3,4,5,6,7,8,9"' your-image-name