Spaces:
Sleeping
Sleeping
Commit
·
ef8f6a5
1
Parent(s):
aa82c4e
Update Dockerfile
Browse files- Dockerfile +23 -25
Dockerfile
CHANGED
@@ -1,37 +1,35 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
#
|
4 |
-
|
5 |
-
ENV USER_CONFIG=""
|
6 |
|
7 |
-
#
|
8 |
-
|
9 |
|
10 |
-
#
|
11 |
-
|
|
|
12 |
|
13 |
-
#
|
14 |
-
|
15 |
-
RUN adduser --system --group myappuser --uid ${USER_ID} user
|
16 |
-
|
17 |
-
# Set the working directory to /app
|
18 |
-
WORKDIR /app
|
19 |
|
20 |
# Copy the current directory contents into the container at /app
|
21 |
-
COPY .
|
22 |
|
23 |
-
# Set
|
24 |
-
RUN
|
25 |
|
26 |
-
#
|
27 |
-
|
|
|
28 |
|
29 |
-
#
|
30 |
-
|
31 |
|
32 |
-
#
|
33 |
-
|
34 |
|
35 |
-
# Example CMD
|
36 |
-
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"
|
37 |
|
|
|
1 |
+
# Use the base Docker image
|
2 |
+
FROM circulartextapp/spaceread:latest
|
3 |
|
4 |
+
# Set up a new user named "user" with user ID 1000
|
5 |
+
RUN useradd -m -u 1000 user
|
|
|
6 |
|
7 |
+
# Switch to the "user" user
|
8 |
+
USER user
|
9 |
|
10 |
+
# Set home to the user's home directory
|
11 |
+
ENV HOME=/home/user \
|
12 |
+
PATH=/home/user/.local/bin:$PATH
|
13 |
|
14 |
+
# Set the working directory to the user's home directory
|
15 |
+
WORKDIR $HOME
|
|
|
|
|
|
|
|
|
16 |
|
17 |
# Copy the current directory contents into the container at /app
|
18 |
+
COPY . $HOME/app
|
19 |
|
20 |
+
# Set permissions for the app directory
|
21 |
+
RUN chmod -R 777 $HOME/app
|
22 |
|
23 |
+
# Install additional dependencies if needed
|
24 |
+
# For example, if you have additional dependencies listed in requirements.txt
|
25 |
+
# RUN pip install --no-cache-dir -r $HOME/app/requirements.txt
|
26 |
|
27 |
+
# Switch back to the "user" user
|
28 |
+
USER user
|
29 |
|
30 |
+
# Set the working directory to the user's app directory
|
31 |
+
WORKDIR $HOME/app
|
32 |
|
33 |
+
# Example CMD (modify as needed)
|
34 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
35 |
|