-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (15 loc) · 723 Bytes
/
Dockerfile
File metadata and controls
22 lines (15 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM pytorch/pytorch:latest
WORKDIR /app
RUN mkdir -p ~/.huggingface
# Use the environment variable to write the token to the file
RUN echo -n $HUGGINGFACE_TOKEN > ~/.huggingface/token
# Update system and install necessary system packages for git and wget
RUN apt-get update && apt-get install -y git wget && rm -rf /var/lib/apt/lists/*
# Clone the repository
RUN git clone https://github.com/samarsheikh001/celery-handler.git .
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Set environment variable
ENV PYTHONUNBUFFERED 1
# Run celery worker when the container launches
CMD ["celery", "-A", "make_celery", "worker", "--loglevel", "INFO", "-c", "1"]