Spaces:
AHC-Devs
/
Running on CPU Upgrade

File size: 1,346 Bytes
8a9c182
019d169
da1638c
527a041
 
da1638c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
527a041
019d169
da1638c
 
 
92aa835
8a9c182
da1638c
 
8a9c182
da1638c
 
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
FROM heartexlabs/label-studio:hf-latest

# ---------- install aws-cli + sqlite3 (run as root) ----------
USER root

RUN apt-get update && \
    apt-get install -y --no-install-recommends curl unzip sqlite3 && \
    # AWS CLI v2
    curl -Lo /tmp/awscliv2.zip https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip && \
    unzip -q /tmp/awscliv2.zip -d /tmp && \
    /tmp/aws/install && \
    rm -rf /tmp/aws /tmp/awscliv2.zip && \
    # Create /data and hand ownership to the LS user before switching
    mkdir -p /data && \
    chown -R 1001:0 /data && \
    chmod -R 775 /data && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# ---------- copy our entrypoint wrapper ----------
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

# ---------- switch back to the non-root LS user (matches official image) ----------
USER 1001

# ---------- signup disabled by default: only admin-invited users can log in ----------
# Protects a Public HF Space — strangers reach the login screen but cannot
# self-register. Remove or set to "false" only if you want open registration.
ENV LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK=true

# ---------- tell Label Studio where its data lives ----------
ENV LABEL_STUDIO_BASE_DATA_DIR=/data

# ---------- run our backup-wrapper instead of the default CMD ----------
CMD ["/entrypoint.sh"]